Skip to content
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

BUG: AssertionError using mask on a dataframe with shape (1, n) #4071

Closed
LionelR opened this issue Jun 28, 2013 · 6 comments

Comments

Projects
None yet
2 participants
@LionelR
Copy link

commented Jun 28, 2013

Using a DataFrame of bools to mask some values in another dataframe works great:

In [84]: pd.DataFrame([[1,2],[3,4]]).mask(pd.DataFrame([[True,False],[False, True]]))
Out[84]: 
    0   1
0 NaN   2
1   3 NaN

but not if we try on a dataframe with a single index:

In [85]: pd.DataFrame([[1,2],]).mask(pd.DataFrame([[True,False],]))
AssertionError: Number of Block dimensions (1) must equal number of axes (2)
@cpcloud

This comment has been minimized.

Copy link
Member

commented Jun 28, 2013

what version are you using?

@LionelR

This comment has been minimized.

Copy link
Author

commented Jun 28, 2013

0.11.0

@cpcloud

This comment has been minimized.

Copy link
Member

commented Jun 28, 2013

different error on latest master ... marked as a bug for 0.13

@cpcloud

This comment has been minimized.

Copy link
Member

commented Jun 28, 2013

@LionelR thanks for the report

@ghost ghost assigned cpcloud Jun 28, 2013

@LionelR

This comment has been minimized.

Copy link
Author

commented Jun 28, 2013

Thanks for this fast fix

@cpcloud

This comment has been minimized.

Copy link
Member

commented Jun 28, 2013

no problemo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.