-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Open
Labels
CategoricalCategorical Data TypeCategorical Data TypeDeprecateFunctionality to remove in pandasFunctionality to remove in pandasExtensionArrayExtending 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 actionPDEP missing valuesIssues that would be addressed by the Ice Cream Agreement from the Aug 2023 sprintIssues that would be addressed by the Ice Cream Agreement from the Aug 2023 sprint
Description
import pandas as pd
from pandas.core.dtypes.cast import find_common_type
left = pd.Index([1, 2, 3, 4])
right = pd.CategoricalIndex([1, None], categories=left)
dtype = find_common_type([left.dtype, right.dtype])
>>> right.astype(dtype)
ValueError: Cannot convert float NaN to integer
xref #37930; I expect this would also be relevant for #19371
Metadata
Metadata
Assignees
Labels
CategoricalCategorical Data TypeCategorical Data TypeDeprecateFunctionality to remove in pandasFunctionality to remove in pandasExtensionArrayExtending 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 actionPDEP missing valuesIssues that would be addressed by the Ice Cream Agreement from the Aug 2023 sprintIssues that would be addressed by the Ice Cream Agreement from the Aug 2023 sprint