-
-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
ExtensionArrayExtending pandas with custom dtypes or arrays.Extending pandas with custom dtypes or arrays.Needs DiscussionRequires discussion from core team before further actionRequires discussion from core team before further action
Description
xref #25308 (comment)
When EAs go through cython routines, they need to be converted to numpy arrays (and dtypes) first and then recast to the correct EA. This recast may require specific logic. For example, DatetimeTZDtype
s need to be localized to UTC first before applying the dtype.
The proposal is for (optional) internal _serialize
and _from_serialized
methods that defines specific recasting logic for the EA. @jreback proposed something like:
serialized, dtype = EA._serialize()
original = EA._from_serialize(serialized, dtype)
Metadata
Metadata
Assignees
Labels
ExtensionArrayExtending pandas with custom dtypes or arrays.Extending pandas with custom dtypes or arrays.Needs DiscussionRequires discussion from core team before further actionRequires discussion from core team before further action