Skip to content

Commit

Permalink
MAINT: .take() --> ._take()
Browse files Browse the repository at this point in the history
  • Loading branch information
gfyoung committed Sep 23, 2017
1 parent 35812d0 commit 47e1879
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -2000,7 +2000,7 @@ def _ixs(self, i, axis=0):
label = self.index[i]
if isinstance(label, Index):
# a location index by definition
result = self.take(i, axis=axis)
result = self._take(i, axis=axis)
copy = True
else:
new_values = self._data.fast_xs(i)
Expand Down Expand Up @@ -2032,7 +2032,7 @@ def _ixs(self, i, axis=0):
return self.loc[:, lab_slice]
else:
if isinstance(label, Index):
return self.take(i, axis=1)
return self._take(i, axis=1, convert=True)

index_len = len(self.index)

Expand Down Expand Up @@ -2114,10 +2114,10 @@ def _getitem_array(self, key):
# be reindexed to match DataFrame rows
key = check_bool_indexer(self.index, key)
indexer = key.nonzero()[0]
return self.take(indexer, axis=0)
return self._take(indexer, axis=0, convert=False)
else:
indexer = self.loc._convert_to_indexer(key, axis=1)
return self.take(indexer, axis=1)
return self._take(indexer, axis=1, convert=True)

def _getitem_multilevel(self, key):
loc = self.columns.get_loc(key)
Expand Down Expand Up @@ -3333,7 +3333,7 @@ def dropna(self, axis=0, how='any', thresh=None, subset=None,
check = indices == -1
if check.any():
raise KeyError(list(np.compress(check, subset)))
agg_obj = self.take(indices, axis=agg_axis)
agg_obj = self._take(indices, axis=agg_axis)

count = agg_obj.count(axis=agg_axis)

Expand All @@ -3349,7 +3349,7 @@ def dropna(self, axis=0, how='any', thresh=None, subset=None,
else:
raise TypeError('must specify how or thresh')

result = self.take(mask.nonzero()[0], axis=axis)
result = self._take(mask.nonzero()[0], axis=axis, convert=False)

if inplace:
self._update_inplace(result)
Expand Down

0 comments on commit 47e1879

Please sign in to comment.