예제 #1
0
 def test_create_categorical(self):
     # GH#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)