Skip to content

Commit 2e02f10

Browse files
committed
revert internal method
1 parent 846b26d commit 2e02f10

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

pandas/core/base.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,9 +1105,6 @@ def nunique(self, dropna: bool = True) -> int:
11051105
obj = remove_na_arraylike(self) if dropna else self
11061106
return len(obj.unique())
11071107

1108-
def _is_unique(self) -> bool:
1109-
return self.nunique(dropna=False) == len(self)
1110-
11111108
@property
11121109
def is_unique(self) -> bool:
11131110
"""
@@ -1117,7 +1114,7 @@ def is_unique(self) -> bool:
11171114
-------
11181115
bool
11191116
"""
1120-
return self._is_unique()
1117+
return self.nunique(dropna=False) == len(self)
11211118

11221119
@property
11231120
def is_monotonic(self) -> bool:

pandas/core/frame.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5396,7 +5396,7 @@ def is_unique(
53965396
self = self[subset]
53975397

53985398
if len(self.columns):
5399-
return self.apply(Series._is_unique)
5399+
return self.apply(lambda x: x.is_unique)
54005400
else:
54015401
return self._constructor_sliced(dtype=bool)
54025402

0 commit comments

Comments
 (0)