Skip to content

REGR: to_frame with name=None no longer gives default name #45448

Closed
@jorisvandenbossche

Description

@jorisvandenbossche

With released pandas we have:

In [1]: pd.__version__
Out[1]: '1.3.5'

In [2]: pd.Series([1, 2, 3]).to_frame(None)
Out[2]: 
   0
0  1
1  2
2  3

while in master / pandas 1.4, the same code gives a DataFrame with column name of NaN (actually None, but the display is wrong):

In [1]: pd.Series([1, 2, 3]).to_frame(None)
Out[1]: 
   NaN
0    1
1    2
2    3

This change gives a bunch of failures in the dask test suite (xref dask/dask#8580)

Metadata

Metadata

Assignees

No one assigned

    Labels

    RegressionFunctionality that used to work in a prior pandas version

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions