Inzynierka/Lib/site-packages/pandas/tests/base/common.py

11 lines
297 B
Python
Raw Normal View History

2023-06-02 12:51:02 +02:00
from typing import Any
from pandas import Index
from pandas.api.types import is_bool_dtype
def allow_na_ops(obj: Any) -> bool:
"""Whether to skip test cases including NaN"""
is_bool_index = isinstance(obj, Index) and is_bool_dtype(obj)
return not is_bool_index and obj._can_hold_na