Skip to content

Commit fb7bf94

Browse files
authored
PERF: Remove unnecessary copies in sorting functions (#33917) (#34192)
* PERF: Remove unnecessary copies in sorting functions * Run tests * Run tests * Add asv * Run black * Remove asv * Run tests * Run tests * Run tests * Run tests * Run tests * Run tests Co-authored-by: mproszewska <[email protected]>
1 parent 5703477 commit fb7bf94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/sorting.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ def ensure_key_mapped(values, key: Optional[Callable], levels=None):
385385
from pandas.core.indexes.api import Index
386386

387387
if not key:
388-
return values.copy()
388+
return values
389389

390390
if isinstance(values, ABCMultiIndex):
391391
return ensure_key_mapped_multiindex(values, key, level=levels)

0 commit comments

Comments
 (0)