Patrick Hoefler

Results 345 comments of Patrick Hoefler

Yeah this is also a bug then. Could you check if the categorical dtypes match and then return the dtype accordingly?

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...

I think there exists one that includes numpy dtypes, but this would work too