-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Open
Labels
ExtensionArrayExtending pandas with custom dtypes or arrays.Extending pandas with custom dtypes or arrays.PerformanceMemory or execution speed performanceMemory or execution speed performanceWarningsWarnings that appear or should be added to pandasWarnings that appear or should be added to pandas
Description
In the ExtensionArray docstring, we note that
Some methods require casting the ExtensionArray to an ndarray of Python
objects with ``self.astype(object)``, which may be expensive. When
performance is a concern, we highly recommend overriding the following
methods:
* fillna
* dropna
* unique
* factorize / _values_for_factorize
* argsort / _values_for_argsort
I think we should also issue a warning in those cases. We would filter the warning by default, so it doesn't appear to users, but would show up when the base tests are being run. Then the EA author can choose to ignore that warning, or implement it more efficiently.
Metadata
Metadata
Assignees
Labels
ExtensionArrayExtending pandas with custom dtypes or arrays.Extending pandas with custom dtypes or arrays.PerformanceMemory or execution speed performanceMemory or execution speed performanceWarningsWarnings that appear or should be added to pandasWarnings that appear or should be added to pandas