Patrick Hoefler
Patrick Hoefler
Yeah this is also a bug then. Could you check if the categorical dtypes match and then return the dtype accordingly?
How does concat behave in that case?
Yeah I think t2 is off
Could you try t2 with categories specified as a,b, c?
No this make sense, the dtypes are not equal with different categories. But enlargement with a scalar is a different case, we should preserve categorical dtype there. We have to...
DataFrame cases don't work yet, this is correct. But this has multiple issues still, so lets focus on Series here
Could you also add a test where we enlarge with nan? This is not part of the categories but should probably work? Not sure
I was referring to the opposite. ``` result = Series([1, 2, 3], dtype=pd.CategoricalDtype(categories=pd.Index([1, 2, 3]))) result.loc[1] = np.nan # np.nan and pd.NA ``` this keeps categorical dtype, e.g. enlargement should...
Its called something like any_numeric_dtype
I think there exists one that includes numpy dtypes, but this would work too