Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions pandas/tests/test_categorical.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ def test_getitem_listlike(self):
expected = c[np.array([100000]).astype(np.int64)].codes
tm.assert_numpy_array_equal(result, expected)

def test_getname_category(self):
result = 'A'
s = pd.Series([1, 2, 3], name='A').astype('category')
s = s.cat.set_categories([1, 2, 3])
expected = s.astype('category').name
tm.assert_almost_equal(result, expected)

def test_getitem_category_type(self):
# GH 14580
# test iloc() on Series with Categorical data
Expand Down