-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Address inf_as_na pandas deprecation #3424
Conversation
seaborn/_base.py
Outdated
# it is similar to GH2419, but more complicated because | ||
# supporting `order` in categorical plots is tricky | ||
orig = orig[orig.isin(self.var_levels[var])] | ||
orig = orig.replace(np.inf, np.nan).dropna() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about negative inf?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. Added -np.inf
@mroeschke any idea why this is still failing? FWIW seaborn tests are now failing on the pandas rc as a result of the change so it would be good to sort this out. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #3424 +/- ##
=======================================
Coverage 98.32% 98.32%
=======================================
Files 77 77
Lines 24303 24305 +2
=======================================
+ Hits 23897 23899 +2
Misses 406 406
|
Okay got this to pass. I think the tested version of pandas (1.2) has a bug where |
Nice! |
Will be deprecated in pandas 2.1 https://pandas.pydata.org/docs/dev/whatsnew/v2.1.0.html#deprecations