Skip to content

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

Merged
merged 5 commits into from
Jun 2, 2020

Conversation

psteinb
Copy link
Contributor

@psteinb psteinb commented May 29, 2020

  • 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 / passed
    this is an PR on documentation only, unit tests are not needed.

  • [ ] whatsnew entry
    I think I don't need this as this is a PR related to documentation only.

dfd

# Setting a single item (recommended)
dfd.loc[2, 'a'] = 11
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in de9f6bd

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please resolve at will

'three', 'two', 'one', 'six'],
'c': np.arange(7)})
dfd = dfc.copy()
# Setting multiple items using a mask (recommended)
Copy link
Contributor

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)

Copy link
Contributor Author

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.

Copy link
Contributor

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."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fine with me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 5aa53c6

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please resolve at will

@jreback jreback added the Indexing Related to indexing on series/frames, not to indexes themselves label Jun 2, 2020
@jreback jreback added this to the 1.1 milestone Jun 2, 2020
@jreback jreback merged commit 5703477 into pandas-dev:master Jun 2, 2020
@jreback
Copy link
Contributor

jreback commented Jun 2, 2020

thanks @psteinb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Docs Indexing Related to indexing on series/frames, not to indexes themselves
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: Indexing and selecting data and the use of mask/where
4 participants