Skip to content

BUG: Using boolean keys to select a column (GH44322) #44425

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 3 commits into from
Nov 15, 2021

Conversation

DriesSchaumont
Copy link
Member

@DriesSchaumont DriesSchaumont commented Nov 13, 2021

@@ -178,6 +178,13 @@ def test_column_types_consistent(self):
)
tm.assert_frame_equal(df, expected)

def test_loc_getitem_column_boolean_arg(self):
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 add all of the examples from the OP (working & not-working), parameterizing if appropriate

Copy link
Member Author

Choose a reason for hiding this comment

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

Done. Added isinstance check because tm.assert_equal raises NotImplementedError for scalars.

@jreback jreback added this to the 1.4 milestone Nov 13, 2021
@jreback jreback added Bug Indexing Related to indexing on series/frames, not to indexes themselves labels Nov 13, 2021
Copy link
Member

@phofl phofl left a comment

Choose a reason for hiding this comment

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

lgtm apart from @jreback's comment

@jreback jreback merged commit bc70099 into pandas-dev:master Nov 15, 2021
@jreback
Copy link
Contributor

jreback commented Nov 15, 2021

thanks @DriesSchaumont

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

Successfully merging this pull request may close these issues.

BUG: can't select single column from DataFrame by boolean key
3 participants