-
-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
REGR: Bar plot axis timestamp to string conversion error #46413
REGR: Bar plot axis timestamp to string conversion error #46413
Conversation
pandas/tests/plotting/test_misc.py
Outdated
# GH 38736 | ||
# Ensure string x-axis from the second plot will not be converted to datetime | ||
# due to axis data from first plot | ||
DataFrame( |
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.
Could you add some sort of assertion to these calls instead of just being a smoke test?
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.
Added the _check_plot_works
function to each plot.
I also want to assert the datatype of the axis of the plots (ie. datetime and string), but I am a bit lost on how I can achieve that.
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.
lgtm. cc @mroeschke
Thanks @ivan-ngchakming |
…46413) * test: bar plot axis conversion regr test * test: added check plot works assertion
Added regression test to prevent bar plot from attempting to convert x-axis from string to timestamp due to previous plot's axis units.
Problematic example:
pandas/pandas/plotting/_matplotlib/core.py
Line 1433 in fb35344
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.