Skip to content

DatetimeIndex periods: Change in behavior between 0.17.1 and 0.18.0 #14071

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

Closed
JohnNapier opened this issue Aug 23, 2016 · 1 comment
Closed
Labels
Datetime Datetime data dtype Docs

Comments

@JohnNapier
Copy link

JohnNapier commented Aug 23, 2016

This is not necessarily a bug, but a change in behavior that could not find reported elsewhere.

import pandas as pd,datetime as dt
pd.DatetimeIndex(freq=pd.tseries.offsets.DateOffset(months=6),end=dt.date(2016,1,1),
closed='right',periods=3)

In version 0.17.1 you get

DatetimeIndex(['2015-07-01', '2016-01-01'], dtype='datetime64[ns]', 
freq='<DateOffset: kwds={'months': 6}>')

however, in version 0.18.1 you get

DatetimeIndex(['2015-01-01', '2015-07-01', '2016-01-01'], dtype='datetime64[ns]', 
freq='<DateOffset: kwds={'months': 6}>')

The new behavior seems more intuitive. Is this change documented anywhere? Thanks!

@jreback
Copy link
Contributor

jreback commented Aug 24, 2016

reported / fixed here: #12684

@jreback jreback closed this as completed Aug 24, 2016
@jreback jreback added Docs Datetime Datetime data dtype labels Aug 24, 2016
@jreback jreback added this to the No action milestone Aug 24, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype Docs
Projects
None yet
Development

No branches or pull requests

2 participants