zmc
2023-10-12 ed135d79df12a2466b52dae1a82326941211dcc9
1
2
3
4
5
6
7
8
9
10
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