Esempio n. 1
0
 def test_create_categorical(self):
     # https://github.com/pandas-dev/pandas/pull/17513
     # The public CI constructor doesn't hit this code path with
     # instances of CategoricalIndex, but we still want to test the code
     ci = CategoricalIndex(['a', 'b', 'c'])
     # First ci is self, second ci is data.
     result = CategoricalIndex._create_categorical(ci, ci)
     expected = Categorical(['a', 'b', 'c'])
     tm.assert_categorical_equal(result, expected)
Esempio n. 2
0
 def test_create_categorical(self):
     # https://github.com/pandas-dev/pandas/pull/17513
     # The public CI constructor doesn't hit this code path with
     # instances of CategoricalIndex, but we still want to test the code
     ci = CategoricalIndex(["a", "b", "c"])
     # First ci is self, second ci is data.
     result = CategoricalIndex._create_categorical(ci, ci)
     expected = Categorical(["a", "b", "c"])
     tm.assert_categorical_equal(result, expected)