-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
REGR: to_frame with name=None no longer gives default name #45448
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
Hmm, I see this was changed deliberately to "honor" passed None values (#44212). But so if you want to be able to also pass a default value as third party package (as dask is doing at https://github.com/dask/dask/blob/06e49039764ff29e1de65705e16ff1748731d75b/dask/dataframe/core.py#L3657-L3659), you either have to pass We could also first deprecate this change. |
There are also other places where we don't honor In [3]: pd.Series(pd.Series([1, 2, 3], name="test"), name=None)
Out[3]:
0 1
1 2
2 3
Name: test, dtype: int64 |
its in
id change/deprecate that too. in general if a user explicitly asks for None, they should get it.
IIRC this change was needed for some of the groupby work I was doing which has since started using to_2d_mgr instead of to_frame, so reverting+deprecating might not break things. |
Thanks for raising this @jorisvandenbossche. So for Dask, it seems like long-term we'll want to switch to using |
Ah, yes, forgot about that.
Yes, using that (through |
Ok thanks, yeah I'll stick with the current approach since I think it is safer for cudf. |
With released pandas we have:
while in master / pandas 1.4, the same code gives a DataFrame with column name of NaN (actually None, but the display is wrong):
This change gives a bunch of failures in the dask test suite (xref dask/dask#8580)
The text was updated successfully, but these errors were encountered: