Skip to content

Concat single series along columns returns a DataFrame #17952

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

Closed
TomAugspurger opened this issue Oct 23, 2017 · 2 comments
Closed

Concat single series along columns returns a DataFrame #17952

TomAugspurger opened this issue Oct 23, 2017 · 2 comments
Labels
Docs Reshaping Concat, Merge/Join, Stack/Unstack, Explode

Comments

@TomAugspurger
Copy link
Contributor

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.

@TomAugspurger TomAugspurger added this to the Next Major Release milestone Oct 23, 2017
@TomAugspurger TomAugspurger added Docs Reshaping Concat, Merge/Join, Stack/Unstack, Explode labels Oct 23, 2017
@jreback
Copy link
Contributor

jreback commented Oct 23, 2017

I wouldn't except this to do anything else. if you want to add some docs go for it. this is long estallished behavior.

TomAugspurger added a commit to TomAugspurger/pandas that referenced this issue Oct 23, 2017
@jorisvandenbossche
Copy link
Member

I agree, I think this is the sensible thing to do.

TomAugspurger added a commit that referenced this issue Oct 26, 2017
* DOC: Document return type from concat

For a single Series.

Closes #17952

* Reword
peterpanmj pushed a commit to peterpanmj/pandas that referenced this issue Oct 31, 2017
* DOC: Document return type from concat

For a single Series.

Closes pandas-dev#17952

* Reword
No-Stream pushed a commit to No-Stream/pandas that referenced this issue Nov 28, 2017
* DOC: Document return type from concat

For a single Series.

Closes pandas-dev#17952

* Reword
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

No branches or pull requests

3 participants