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

Comments

@CRP
Copy link
Contributor

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

This comment has been minimized.

Copy link
Member

commented Nov 16, 2011

good point. added this in the above commit

@wesm wesm closed this Nov 16, 2011

@CRP

This comment has been minimized.

Copy link
Contributor Author

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

This comment has been minimized.

Copy link
Member

commented Nov 17, 2011

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.