-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Open
Labels
BugExtensionArrayExtending pandas with custom dtypes or arrays.Extending pandas with custom dtypes or arrays.InternalsRelated to non-user accessible pandas implementationRelated to non-user accessible pandas implementation
Description
Pandas version checks
-
I have checked that this issue has not already been reported.
-
I have confirmed this bug exists on the latest version of pandas.
-
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
from pandas.core.dtypes.cast import np_can_hold_element
# This raises
np_can_hold_element(np.dtype("int64"), Series([1, 2], dtype="Int64"))
# while both of the following work
np_can_hold_element(pd.Int64Dtype, Series([1, 2], dtype="int64"))
np_can_hold_element(pd.Int64Dtype, Series([1, 2], dtype="Int64"))
Issue Description
Using non-ea dtypes and ea-dtype Series objects raises, this should not happen.
Expected Behavior
Should not raise
Installed Versions
Replace this line with the output of pd.show_versions()
Metadata
Metadata
Assignees
Labels
BugExtensionArrayExtending pandas with custom dtypes or arrays.Extending pandas with custom dtypes or arrays.InternalsRelated to non-user accessible pandas implementationRelated to non-user accessible pandas implementation