-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
date_range() drops last date for closed monthly ranges #15886
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
This is what you input
So the end point is first snapped to a valid end-point.
For @chris-b1 thoughts? |
this is a duplicate of #6673 (though that is for a different freq). @stevesimmons if you want to have a look there as well. |
Not sure on this one, like you said in #6673, it's somewhat arbitrary. It seems part of the issue here is that |
@jreback I think this is actually a different issue. #6673 is about the interplay between
(both are the same) As noted above, the tricky/surprising part in this issue is that |
Uh oh!
There was an error while loading. Please reload this page.
pd.date_range() handles closed intervals correctly for daily time series but incorrectly for monthly.
In this example, notice how freq='D' gives 4 days while freq='M' gives 3 months, dropping the final 2017-07-31:
This is with pandas 0.19.2. Here is my output for pd.show_versions():
The text was updated successfully, but these errors were encountered: