-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Concat empty series with mixed TZ doesn't coerce to object #22186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Taking this over as a general concat issue Currently In [13]: pd.concat([
...: pd.SparseSeries([0, 0, None], fill_value=0),
...: pd.SparseSeries([0, None, 0], fill_value=np.nan)
...: ]).fill_value
Out[13]: 0
In [14]: pd.concat([
...: pd.SparseSeries([0, 0, None], fill_value=np.nan),
...: pd.SparseSeries([0, None, 0], fill_value=0)
...: ]).fill_value
Out[14]: nan Are we comfortable calling that a bug? What's the expected behavior, raising? |
I guess this raises a general design question: what dtype coercion are we comfortable with concat doing?
|
For Currently, we try to keep it sparse. e.g. |
prob should density if sparse and dense and both float |
Hmm I don't think so. I think ever implicitly going from sparse to dense is problematic. And on master we currently sparsify the dense series, but we're inconsistent about it:
|
Do we intentionally special case concatenating an empty series with a non-empty series here? I don't think we should. It'd be nice to statically know the output dtype of a
concat
without having to look into the values.I'd expect both of those to be object dtype.
The text was updated successfully, but these errors were encountered: