Skip to content

Commit d411050

Browse files
committed
revert internal method
1 parent 0655145 commit d411050

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
@@ -1038,9 +1038,6 @@ def nunique(self, dropna: bool = True) -> int:
10381038
n -= 1
10391039
return n
10401040

1041-
def _is_unique(self) -> bool:
1042-
return self.nunique(dropna=False) == len(self)
1043-
10441041
@property
10451042
def is_unique(self) -> bool:
10461043
"""
@@ -1050,7 +1047,7 @@ def is_unique(self) -> bool:
10501047
-------
10511048
bool
10521049
"""
1053-
return self._is_unique()
1050+
return self.nunique(dropna=False) == len(self)
10541051

10551052
@property
10561053
def is_monotonic(self) -> bool:

pandas/core/frame.py

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

52255225
if len(self.columns):
5226-
return self.apply(Series._is_unique)
5226+
return self.apply(lambda x: x.is_unique)
52275227
else:
52285228
return self._constructor_sliced(dtype=bool)
52295229

0 commit comments

Comments
 (0)