Tobias Pitters
Tobias Pitters
> What happens when a string is used for enlarging? Like a The series is also cast to `object`, which might not be the behaviour we want. But this also...
> Yeah this is also a bug then. Could you check if the categorical dtypes match and then return the dtype accordingly? How should we tackle that problem? If the...
> How does concat behave in that case? Like this ```python import pandas as pd s = pd.Series(["a", "b", "c"], dtype="category") t = pd.concat([s, pd.Series(["a"], index=[3])]) # dtype: object t2...
> Could you try t2 with categories specified as a,b, c? This is interesting: ```python t = pd.concat([s, pd.Series(["a"])]) # dtype object t2 = pd.concat([s, pd.Series(["a"], dtype="category")]) # dtype object...
> 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...
> Could you also add a test where we enlarge with nan? This is not part of the categories but should probably work? Not sure Yep, it works in the...
> you also add tests so that the integer dtype is kept like above? e.g. Int64 stays Int64, Int32 stays Int32 and so on. (we have fixtures for that) Found...
> Its called something like any_numeric_dtype used `any_numeric_ea_dtype` for this, seems like the most generic fixture available for this case
> I think there exists one that includes numpy dtypes, but this would work too besides that I still don't find a unified extension array + numpy dtype fixture it...
> Index([1, 2, 3], dtype=int32) Same issue: ```python pd.Index([1, 2, 3], dtype='int32') >>> Int64Index([1, 2, 3], dtype='int64') ```