Skip to content

Commit b710728

Browse files
evanpwEvan Wright
authored and
Evan Wright
committed
Revert "PERF: perf improvements in drop_duplicates for integer dtyped arrays"
This reverts commit a00c7ea, but leaves new tests and benchmark
1 parent d6ae52a commit b710728

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

pandas/core/frame.py

+1-7
Original file line numberDiff line numberDiff line change
@@ -2994,13 +2994,7 @@ def duplicated(self, subset=None, keep='first'):
29942994
from pandas.hashtable import duplicated_int64, _SIZE_HINT_LIMIT
29952995

29962996
def f(vals):
2997-
2998-
# if we have integers we can directly index with these
2999-
if com.is_integer_dtype(vals):
3000-
from pandas.core.nanops import unique1d
3001-
labels, shape = vals, unique1d(vals)
3002-
else:
3003-
labels, shape = factorize(vals, size_hint=min(len(self), _SIZE_HINT_LIMIT))
2997+
labels, shape = factorize(vals, size_hint=min(len(self), _SIZE_HINT_LIMIT))
30042998
return labels.astype('i8',copy=False), len(shape)
30052999

30063000
if subset is None:

0 commit comments

Comments
 (0)