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 Nov 12, 2016
1 parent 46000da commit ff52ac7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pandas/core/indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -1615,6 +1615,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 ff52ac7

Please sign in to comment.