From 47e18793d92b8cf00c1bc4e053ac1e1b04affead Mon Sep 17 00:00:00 2001 From: gfyoung Date: Sat, 23 Sep 2017 11:10:36 -0700 Subject: [PATCH] MAINT: .take() --> ._take() --- pandas/core/frame.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pandas/core/frame.py b/pandas/core/frame.py index 47955b5e5cfee0..02f274f7c63b09 100644 --- a/pandas/core/frame.py +++ b/pandas/core/frame.py @@ -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) @@ -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) @@ -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) @@ -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) @@ -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)