years-only in date_range uses current date · Issue #6961 · pandas-dev/pandas (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

@rosnfeld

Description

@rosnfeld

I ran this on master current as of 2014-04-20 or so and was surprised as to the result:

In [17]: pd.date_range('2014', '2015', freq='M') Out[17]: <class 'pandas.tseries.index.DatetimeIndex'> [2014-04-30, ..., 2015-03-31] Length: 12, Freq: M, Timezone: None

I would have expected that to give me the month-ends in 2014, not a year's worth of month-ends starting from today.

Seems to be related to #3944?