-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
CategoricalCategorical Data TypeCategorical Data TypePerformanceMemory or execution speed performanceMemory or execution speed performancegood first issue
Milestone
Description
Categorical.from_codes coerces its input to an array of np.int64 unconditionally even though the Categorical constructor immediately coerces the input to some other dtype using coerce_indexer_dtype. This coercion might cause a memory usage spike when codes is large. ISTM that we can just avoid the conversion in from_codes entirely and let coerce_indexer_dtype take care of any error case.
Version: master
Metadata
Metadata
Assignees
Labels
CategoricalCategorical Data TypeCategorical Data TypePerformanceMemory or execution speed performanceMemory or execution speed performancegood first issue