-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Fix right hand side dict assignment for DataFrames #9877
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
Conversation
Fix right hand side dict assignment for DataFrames
@@ -249,6 +249,14 @@ new column. | |||
If you are using the IPython environment, you may also use tab-completion to | |||
see these accessible attributes. | |||
|
|||
You can also assign a ``dict`` to a row of a ``DataFrame``: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you maybe specify here that the dict keys are matched with the column names?
@tjragan that's very odd to do anyhow. Supported for nested data structues is very limited, especially with indexing operations. |
It may be odd, but I have a fairly complex data analysis project that uses this extensively. In any case, preserving pandas’ ability to store arbitrary python objects seems like a good idea, and this essentially removes the ability to have a key-value store in a cell.Dr. T.J. Ragan Department of Biochemistry, University of Leicester On 27 May 2015, at 11:57, jreback <[email protected]mailto:[email protected]> wrote: @tjraganhttps://github.com/tjragan that's very odd to do anyhow. Supported for nested data structues is very limited, especially with indexing operations. — |
@tjragan what version of pandas are you using where this actually works? it doesn't work in >=0.14.1 |
it broke when I installed 0.16.1, but works in 0.16.0 On 27 May 2015, at 20:56, jreback <[email protected]mailto:[email protected]> wrote: @tjraganhttps://github.com/tjragan what version of pandas are you using where this actually works? it doesn't work in >=0.14.1 — |
ok, see #10219 pull-requests to fix are welcome |
closes #9874