Skip to content

Commit 5b5ead4

Browse files
committed
BUG: fix iloc with pd.Series on pd.Categorical
Before, iloc on pd.Series returned Categorical object for list-like indexes input, while Series object is expected. Fixes pandas-dev#14580
1 parent 73bc6cf commit 5b5ead4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pandas/core/indexing.py

+1
Original file line numberDiff line numberDiff line change
@@ -1616,6 +1616,7 @@ def _getitem_axis(self, key, axis=0):
16161616

16171617
# force an actual list
16181618
key = list(key)
1619+
return self.obj.take(key, axis=axis, convert=False)
16191620

16201621
else:
16211622
key = self._convert_scalar_indexer(key, axis)

0 commit comments

Comments
 (0)