We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84786b9 commit fffa72eCopy full SHA for fffa72e
pandas/core/algorithms.py
@@ -2025,9 +2025,7 @@ def sort_mixed(values):
2025
)
2026
codes = ensure_platform_int(np.asarray(codes))
2027
2028
- from pandas import Index
2029
-
2030
- if not assume_unique and not Index(values).is_unique:
+ if not assume_unique and not len(unique(values)) == len(values):
2031
raise ValueError("values should be unique if codes is not None")
2032
2033
if sorter is None:
0 commit comments