-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
mask based multi-index assignment of column values described #34461
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
dfd | ||
|
||
# Setting a single item (recommended) | ||
dfd.loc[2, 'a'] = 11 |
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 copy first, like L1876.
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.
fixed in de9f6bd
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.
please resolve at will
doc/source/user_guide/indexing.rst
Outdated
'three', 'two', 'one', 'six'], | ||
'c': np.arange(7)}) | ||
dfd = dfc.copy() | ||
# Setting multiple items using a mask (recommended) |
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.
you don't need the word recommended here (instead you can use it around L1869)
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.
I put it there as @TomAugspurger suggested it in #34383 if I understood correctly.
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.
I think Jeff is saying that "This is the correct access method" implies that this is the recommended way to set things.
Perhaps change "This is the correct access method" to something like "Multiple items can be set with .loc
and a mask."
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.
fine with me.
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.
fixed in 5aa53c6
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.
please resolve at will
thanks @psteinb |
closes DOC: Indexing and selecting data and the use of mask/where #34383
passes
black pandas
not sure what this means, will look it up.
passes
git diff upstream/master -u -- "*.py" | flake8 --diff
[ ] tests added / passedthis is an PR on documentation only, unit tests are not needed.
[ ] whatsnew entryI think I don't need this as this is a PR related to documentation only.