Skip to content

Loss of series name attributes in pd.concat  #10698

Closed
@multiloc

Description

@multiloc

pd.concat nicely preserves name attributes when given a list of series. However, this only works if all series have the name attribute set, otherwise all names are lost:

In [1]: import pandas as pd
In [2]: pd.__version__
Out[2]: '0.16.2'

In [3]: foo = pd.Series([1,2], name='foo')
In [4]: bar = pd.Series([1,2])

In [6]: pd.concat([foo, bar], 1)
Out[6]: 
   0  1
0  1  1
1  2  2

Not sure this qualifies as a bug.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugReshapingConcat, Merge/Join, Stack/Unstack, Explode

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions