-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: PandasAutoDateLocator num_days calculation is wrong #15753
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
Comments
That indeed seems to be the case. Do you have a plot example that shows 'incorrect' behaviour because of this? That would make it possible to check that it actually changes the look in a positive way |
Looks like PR 14716 addressed this but stalled. |
Good catch. |
Actually, looking at that code, I don't think we are going to find an example:
|
Not too familiar with this section of the codebase, but agreed that this shouldn't have an obvious change. The |
I merged the PR, so this can be closed. |
Thank you for the quick fix. |
This line in PandasAutoDateLocator looks like it's missing some parentheses.
https://github.com/pandas-dev/pandas/blob/master/pandas/tseries/converter.py#L264
num_days = ((delta.years * 12.0) + delta.months * 31.0) + delta.days
I stepped through here and with a delta of 5 years, num_days was 60! It's easy enough to fix:
The text was updated successfully, but these errors were encountered: