common.py 297 B

12345678910
  1. from typing import Any
  2. from pandas import Index
  3. from pandas.api.types import is_bool_dtype
  4. def allow_na_ops(obj: Any) -> bool:
  5. """Whether to skip test cases including NaN"""
  6. is_bool_index = isinstance(obj, Index) and is_bool_dtype(obj)
  7. return not is_bool_index and obj._can_hold_na