Skip to content

Concat single series along columns returns a DataFrame #17952

Closed
@TomAugspurger

Description

@TomAugspurger

This came up in dask, I wanted to confirm whether or not it's intentional before dask mirrors pandas:

In [6]: import pandas as pd

In [7]: pd.concat([pd.Series([1, 2], name='foo')], axis='columns')
Out[7]:
   foo
0    1
1    2

In [8]: type(_)
Out[8]: pandas.core.frame.DataFrame

I think it's fine for concat(..., axis=1) to always return a DataFrame, but we should document that.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocsReshapingConcat, Merge/Join, Stack/Unstack, Explode

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions