Skip to content

MonthOffset() gives increase of 1 day instead of 1 month #7707

Closed
@jorisvandenbossche

Description

@jorisvandenbossche

From #7375 (comment):

In [67]: from pandas.tseries import offsets

In [69]: d = pd.Timestamp('2014-01-01 09:00:00')

In [70]: d + offsets.MonthOffset()
Out[70]: Timestamp('2014-01-02 09:00:00')

In [71]: offsets.MonthOffset().apply(d)
Out[71]: Timestamp('2014-01-02 09:00:00')

In [72]: d + offsets.Day()
Out[72]: Timestamp('2014-01-02 09:00:00')

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions