Skip to content

Commit

Permalink
BUG: fix iloc with pd.Series on pd.Categorical
Browse files Browse the repository at this point in the history
Before, iloc on pd.Series returned Categorical object  for list-like  indexes input, while Series object is expected.

Fixes pandas-dev#14580
  • Loading branch information
nathalier committed Dec 17, 2016
1 parent 73bc6cf commit 5b5ead4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pandas/core/indexing.py
Expand Up @@ -1616,6 +1616,7 @@ def _getitem_axis(self, key, axis=0):

# force an actual list
key = list(key)
return self.obj.take(key, axis=axis, convert=False)

else:
key = self._convert_scalar_indexer(key, axis)
Expand Down

0 comments on commit 5b5ead4

Please sign in to comment.