Skip to content
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

DataFrame constructor when passed a Series #373

Closed
CRP opened this issue Nov 16, 2011 · 3 comments
Closed

DataFrame constructor when passed a Series #373

CRP opened this issue Nov 16, 2011 · 3 comments
Milestone

Comments

@CRP
Copy link
Contributor

CRP commented Nov 16, 2011

If I do:

a=Series([1,2,3],index=['a','b','c'],name='x')
b=DataFrame(a)

I would expect b to have a single column 'x' with indices a,b,c; instead only a.values is retained.

@wesm
Copy link
Member

wesm commented Nov 16, 2011

good point. added this in the above commit

@wesm wesm closed this as completed Nov 16, 2011
@CRP
Copy link
Contributor Author

CRP commented Nov 17, 2011

I noticed that the series index is still ignored, and the resulting dataframe has a default index. Is this a specific design decision?

@wesm
Copy link
Member

wesm commented Nov 17, 2011

Oops-- an oversight. fixed and tested in the above commit

dan-nadler pushed a commit to dan-nadler/pandas that referenced this issue Sep 23, 2019
Revert "Merge pull request pandas-dev#363 from manahl/add-concat-flag"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants