You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I wish I could use pandas to do the conversion of ExtensionDtype and ExtensionArray automatically like it does with the internal Pandas Dtypes like eg. Period Intervall with their respective Dtype.
ufloats ufloat
ints int64
periods period[Q-DEC]
dtype: object
Where Ufloat is the registered corresponding ExtensionDtype and having a corresponding ExtensionArray UfloatArray.
[this should provide a description of what the problem is, e.g. "I wish I could use pandas to do [...]"]
Is your feature request related to a problem?
I wish I could use pandas to do the conversion of ExtensionDtype and ExtensionArray automatically like it does with the internal Pandas Dtypes like eg. Period Intervall with their respective Dtype.
output should be
Where Ufloat is the registered corresponding ExtensionDtype and having a corresponding ExtensionArray UfloatArray.
[this should provide a description of what the problem is, e.g. "I wish I could use pandas to do [...]"]
Describe the solution you'd like
For this to work infer_dtype_from_scalar() needs to be patched.
A possible patch would be adding the following here
With this patch inference of registered ExtensionDtype is possible
Furthermore the Inference of ExtensionArray needs to be fixed.
This can be accomplished by patching sanitize_array
The following lines can be added to sanitize_array here in order to add the functionality, however I wouldn't recommend doing it that way.
Furthermore these two functions need to be imported
infer_dtype_from_scalar,
maybe_cast_to_extension_array,
API breaking implications
This should affect the API it only uses the already requirements to the ExtensionDtype and ExtensionArray
The text was updated successfully, but these errors were encountered: