Skip to content

BUG: masking empty DataFrame #11895

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 1 commit into from
Dec 26, 2015
Merged

BUG: masking empty DataFrame #11895

merged 1 commit into from
Dec 26, 2015

Conversation

IamGianluca
Copy link

closes #11859

A ValueError was raised when trying to mask an empty DataFrame. In addition to solve the bug I've also added a simple new unit test in test_frame.py. I didn't add a line in whatsnew because this was already done in #10126

@jreback
Copy link
Contributor

jreback commented Dec 24, 2015

needs a whatsnew note - this is in a different release


df = pd.DataFrame()
df2 = df[df>0]
self.assertEqual(df2.empty, True)
Copy link
Contributor

Choose a reason for hiding this comment

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

use assert_frame_equal

@jreback jreback added Bug Indexing Related to indexing on series/frames, not to indexes themselves Reshaping Concat, Merge/Join, Stack/Unstack, Explode labels Dec 24, 2015
@jreback jreback added this to the 0.18.0 milestone Dec 24, 2015
add unit test

improve unit test and add note in whatsnew
jreback added a commit that referenced this pull request Dec 26, 2015
@jreback jreback merged commit d636a74 into pandas-dev:master Dec 26, 2015
@jreback
Copy link
Contributor

jreback commented Dec 26, 2015

thank you sir!

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 Reshaping Concat, Merge/Join, Stack/Unstack, Explode
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: masking empty DataFrame
2 participants