Skip to content

PeriodIndex.is_monotonic only for monotonic increasing #21335

Closed
@jbrockmendel

Description

@jbrockmendel
dti = pd.date_range('2016-01-01', periods=3)
pi = dti.to_period('D')

>>> pi.is_monotonic
True
>>> pi[::-1].is_monotonic
False

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIndexRelated to the Index class or subclassesPeriodPeriod data type

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions