Skip to content

Commit 47e1879

Browse files
committed
MAINT: .take() --> ._take()
1 parent 35812d0 commit 47e1879

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pandas/core/frame.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -2000,7 +2000,7 @@ def _ixs(self, i, axis=0):
20002000
label = self.index[i]
20012001
if isinstance(label, Index):
20022002
# a location index by definition
2003-
result = self.take(i, axis=axis)
2003+
result = self._take(i, axis=axis)
20042004
copy = True
20052005
else:
20062006
new_values = self._data.fast_xs(i)
@@ -2032,7 +2032,7 @@ def _ixs(self, i, axis=0):
20322032
return self.loc[:, lab_slice]
20332033
else:
20342034
if isinstance(label, Index):
2035-
return self.take(i, axis=1)
2035+
return self._take(i, axis=1, convert=True)
20362036

20372037
index_len = len(self.index)
20382038

@@ -2114,10 +2114,10 @@ def _getitem_array(self, key):
21142114
# be reindexed to match DataFrame rows
21152115
key = check_bool_indexer(self.index, key)
21162116
indexer = key.nonzero()[0]
2117-
return self.take(indexer, axis=0)
2117+
return self._take(indexer, axis=0, convert=False)
21182118
else:
21192119
indexer = self.loc._convert_to_indexer(key, axis=1)
2120-
return self.take(indexer, axis=1)
2120+
return self._take(indexer, axis=1, convert=True)
21212121

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

33383338
count = agg_obj.count(axis=agg_axis)
33393339

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

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

33543354
if inplace:
33553355
self._update_inplace(result)

0 commit comments

Comments
 (0)