-
Notifications
You must be signed in to change notification settings - Fork 42
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
TypeError using DataFrame.mask #93
Comments
I should have searched the pandas issues first! |
I'm getting hit by this, too! df.where does not behave well when it passes rows with NaNs. I see the above link to pandas...we'll see what happens. |
bors bot
added a commit
that referenced
this issue
Oct 27, 2022
133: Support for Pandas 1.5/1.6 r=andrewgsavage a=andrewgsavage - [x] Closes #128 #125 #117 #113 #93 #26 - [x] Executed ``pre-commit run --all-files`` with no errors - [x] The change is fully covered by automated unit tests - [x] Documented in docs/ as appropriate - [x] Added an entry to the CHANGES file Probably closes #120 This is running locally, with hgrecco/pint#1596. Quite a few additional tests passing! This is following the change to is_list_like in pandas, so allows constrcutors and setitem to work. Co-authored-by: Andrew <andrewgsavage@gmail.com>
this works now
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi there, as always thanks for your hard work!
I'm runing into problem while trying to use the
DataFrame.mask
method on aDataFrame
withPintArray
.Here's my code:
It returns:
The error stems from
pandas
ExtensionBlock.where
method:nan
in this case) is a scalar and isna, then it uses thedtype.na_value
(Quantity(np.nan, "meters")
in this case)pd.api.types.is_scalar(Quantity(np.nan, "meters") == False
.Is it something that can be done here or it's a pandas issue?
The text was updated successfully, but these errors were encountered: