-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Inconsistent date range behaviour #1573
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
MonthEnd wasn't designed to be anchored like that. What you describe should be a separate "DayOfMonth" offset or some other flexible "2nd tuesday of the month" offset. |
Wouldn't that rationale entail that there should also be a MonthOfYear offset as well? |
Sorry, I don't mean the general concept of a month end should not be anchored. It's more of a practical consideration here that years have a fixed number of months. And there tends to be more variety of use cases for specifying monthly offsets. Would you be interested in helping out with a PR? If you don't want to make separate DateOffset for this, just make sure that MonthBegin and the business month offsets also get the same treatment as MonthEnd. All that code is in pandas.tseries.offsets Thanks! |
You're right in that there's not much of a call for this, and for me, not enough of an itch to scratch, was more a case of inconsistency. If it gets itchier, will revisit then. Thanks |
Sounds good. I'll keep the issue open 'til the itch gets bad enough to scratch for whoever. |
Hi all, This issue was first discussed nearly 4.5 years ago. Have there been any developments since then? My feeling is no, but it also sounds like there wasn't much traction for this enhancement either. My gut instinct is to close this issue. What do you think? |
I think this is closed by #18226 |
Indeed, thanks |
Closed by #18226 |
pandas.DatetimeIndex(start=datetime.datetime(2012, 2, 28), freq=pandas.offsets.YearEnd(month=2), periods=10)
works, but not
pandas.DatetimeIndex(start=datetime.datetime(2012, 2, 20), freq=pandas.offsets.MonthEnd(day=20), periods=10)
The text was updated successfully, but these errors were encountered: