Skip to content

Commit ed4ee8a

Browse files
committed
STYLE: fix pylint redefined-outer-name warnings (pandas-dev#49656)
Fixed warnings for the following files :- - pandas/core/arrays/datetimelike.py - pandas/core/base.py - pandas/core/computation/pytables.py Iteration :- 2
1 parent 5f906e5 commit ed4ee8a

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

pandas/core/arrays/datetimelike.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1690,7 +1690,7 @@ def _mode(self, dropna: bool = True):
16901690
if dropna:
16911691
mask = self.isna()
16921692

1693-
i8modes = algorithms.algos.mode(self.view("i8"), mask=mask)
1693+
i8modes = algorithms.mode(self.view("i8"), mask=mask)
16941694
npmodes = i8modes.view(self._ndarray.dtype)
16951695
npmodes = cast(np.ndarray, npmodes)
16961696
return self._from_backing_data(npmodes)

pandas/core/base.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@
6161
ops,
6262
)
6363
from pandas.core.accessor import DirNamesMixin
64-
from pandas.core.algorithms import algos
6564
from pandas.core.arraylike import OpsMixin
6665
from pandas.core.arrays import ExtensionArray
6766
from pandas.core.construction import (
@@ -987,7 +986,7 @@ def value_counts(
987986
NaN 1
988987
dtype: int64
989988
"""
990-
return algos.value_counts(
989+
return algorithms.value_counts(
991990
self,
992991
sort=sort,
993992
ascending=ascending,
@@ -1002,7 +1001,7 @@ def unique(self):
10021001
# i.e. ExtensionArray
10031002
result = values.unique()
10041003
else:
1005-
result = algos.unique1d(values)
1004+
result = algorithms.unique1d(values)
10061005
return result
10071006

10081007
@final
@@ -1290,7 +1289,7 @@ def drop_duplicates(self, *, keep: DropKeep = "first"):
12901289

12911290
@final
12921291
def _duplicated(self, keep: DropKeep = "first") -> npt.NDArray[np.bool_]:
1293-
return algos.duplicated(self._values, keep=keep)
1292+
return algorithms.duplicated(self._values, keep=keep)
12941293

12951294
def _arith_method(self, other, op):
12961295
res_name = ops.get_op_result_name(self, other)

0 commit comments

Comments
 (0)