projektAI/venv/Lib/site-packages/pandas/tests/arithmetic/test_categorical.py

13 lines
358 B
Python
Raw Normal View History

2021-06-06 22:13:05 +02:00
import numpy as np
from pandas import Categorical, Series
import pandas._testing as tm
class TestCategoricalComparisons:
def test_categorical_nan_equality(self):
cat = Series(Categorical(["a", "b", "c", np.nan]))
expected = Series([True, True, True, False])
result = cat == cat
tm.assert_series_equal(result, expected)