We currently do a fair amount of ad-hoc normalization / edge case handling for when we get pandas (or xarray or TF or ...) objects that are close to numpy but not quite (for example #16347 which uses a warning context manager which is extra not-thread-safe in other places we check of obj.values).
We don't really ever get complaints from TF or xarray, so the practical question is how much do we special-case pandas, and who will set up the tests, and lead the charge on integration? This is, in my opinion, hampered by not having anyone on the lead-dev team who regularly uses pandas. It would be nice to try and entrain someone who did, who could advocate for changes and/or interface with the pandas project (who I have found are great to work with, but you know, are pushing their own things forward).
Which libraries are we talking about? pandas, xarray, polars, tensorflow(?), ...
I've added a test for xarray in #22560, which also centralizes this, but probably makes sense to add tests for all libraries that is of interest (there was one for pandas). (polars can not yet be installed with conda.)
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
Activity
tacaswell commented on Feb 3, 2020
also xref: #16400
jklymak commented on May 3, 2021
We don't really ever get complaints from TF or xarray, so the practical question is how much do we special-case pandas, and who will set up the tests, and lead the charge on integration? This is, in my opinion, hampered by not having anyone on the lead-dev team who regularly uses pandas. It would be nice to try and entrain someone who did, who could advocate for changes and/or interface with the pandas project (who I have found are great to work with, but you know, are pushing their own things forward).
timhoffm commented on May 3, 2021
.values is not recommended anymore in pandas: https://pandas.pydata.org/docs/reference/api/pandas.Series.values.html / https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.values.html. Probably to_numpy() is the way to go.
jklymak commented on May 3, 2021
Yeah, unfortunately, thats not universal. xarray still uses .values.
oscargus commented on Feb 28, 2022
Which libraries are we talking about? pandas, xarray, polars, tensorflow(?), ...
I've added a test for xarray in #22560, which also centralizes this, but probably makes sense to add tests for all libraries that is of interest (there was one for pandas). (polars can not yet be installed with conda.)
github-actions commented on Mar 30, 2026
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help!
timhoffm commented on Mar 30, 2026
I close this. #22879 is a more recent discussion, and I think there are others as well.