Skip to content

years-only in date_range uses current date #6961

Closed
@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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions