Skip to content

TST: remove chained assignment outside indexing tests #42882

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

jorisvandenbossche
Copy link
Member

Small piece broken off from #41878

This updates a bunch of tests that are unnecessarily using chained assignment. Outside tests specifically about indexing, I think it's better/cleaner to use the more idiomatic single .loc call (and also makes it easier to change the behaviour as I am doing in #41878).

@jorisvandenbossche jorisvandenbossche added Testing pandas testing functions or related to the test suite Clean labels Aug 4, 2021
@jorisvandenbossche jorisvandenbossche added this to the 1.4 milestone Aug 4, 2021
@jbrockmendel
Copy link
Member

Outside tests specifically about indexing, I think it's better/cleaner to use the more idiomatic single .loc call

+1

Copy link
Member

@jbrockmendel jbrockmendel left a comment

Choose a reason for hiding this comment

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

LGTM

@jreback jreback merged commit 74e50ec into pandas-dev:master Aug 4, 2021
@jorisvandenbossche jorisvandenbossche deleted the update-tests-chained-assignment branch August 4, 2021 15:52
feefladder pushed a commit to feefladder/pandas that referenced this pull request Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Clean Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants