Skip to content

Commit bab3b1f

Browse files
authored
REF: avoid runtime import of Index (#32710)
1 parent 0ed6d53 commit bab3b1f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pandas/core/algorithms.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -2025,9 +2025,7 @@ def sort_mixed(values):
20252025
)
20262026
codes = ensure_platform_int(np.asarray(codes))
20272027

2028-
from pandas import Index
2029-
2030-
if not assume_unique and not Index(values).is_unique:
2028+
if not assume_unique and not len(unique(values)) == len(values):
20312029
raise ValueError("values should be unique if codes is not None")
20322030

20332031
if sorter is None:

0 commit comments

Comments
 (0)