-
Notifications
You must be signed in to change notification settings - Fork 16
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
Pandas 2.2.0 #359
Pandas 2.2.0 #359
Conversation
…quite happy with the latter).
def _calculate_bins(self, data, bins): | ||
nd_values = data.infer_objects(copy=False)._get_numeric_data() | ||
values = np.ravel(nd_values) | ||
values = values[~isna(values)] |
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.
I'm not happy with repeating this a third time, and I haven't checked if the weights definitely need checking for nans
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.
Why not work with data.to_numpy().ravel()
in quantile
below? seems simpler to me...
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.
Essentially because I'm attempting to replicate the pandas versions as closely as possible
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.
Well, considering that Hist1dPlot
was created for a WeightedSeries
, we could simplify things here.
Even simpler than my previous suggestion:
xmin, xmax = data.quantile(q).to_numpy().ravel()
Not sure what is easier for maintenance in the long run, though, so happy with either approach.
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.
That's too tidy to resist!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #359 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 36 36
Lines 3043 3032 -11
=========================================
- Hits 3043 3032 -11 ☔ View full report in Codecov by Sentry. |
…are the problem???)" This reverts commit 1f9857b.
I think that's all the new deprecation warnings, aside from the warnings about constructing from a |
PR here which may clean up some of the BlockManager mess, pandas-dev/pandas#57553 Edit: I've just run anesthetic with this branch of pandas, and all the BlockManager warnings seem to have gone away, so I'm not going to worry about them any further |
…red after changes to defaults in pandas
def _calculate_bins(self, data, bins): | ||
nd_values = data.infer_objects(copy=False)._get_numeric_data() | ||
values = np.ravel(nd_values) | ||
values = values[~isna(values)] |
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.
Why not work with data.to_numpy().ravel()
in quantile
below? seems simpler to me...
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.
Is there anything else that needs to be taken into account for this?
If not, I am happy with this. Thanks for catching this so quickly @AdamOrmondroyd!
Feel free to handle my inline reply as you see fit.
… after cloning a fresh repo
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.
Thanks @AdamOrmondroyd!
Description
Pandas 2.2.0 just released, with a flurry of changes to the plotting to become more stateless (though not even close to achieving it), and a whole flood of deprecations ready for pandas 3.0 (!!!!!!!)
Unfortunately, the changes to the plotting are incompatible with the old
I'm yet to do anything about the warnings
Fixes # (issue)
Checklist:
flake8 anesthetic tests
)pydocstyle --convention=numpy anesthetic
)python -m pytest
)