Skip to content

Inconsistent Behavior of min on Timestamps w/ and w/o timezones #5967

Closed
@cancan101

Description

@cancan101

related #4147

Observe w/o tz:

In [46]: pd.Series([pd.NaT, pd.Timestamp("2013-1-1")]).min()
Out[46]: Timestamp('2013-01-01 00:00:00', tz=None)

however w/ tz:

In [48]: pd.Series([pd.NaT, pd.Timestamp("2013-1-1", tz="US/Eastern")]).min()
Out[48]: NaT

strangely, max works:

In [60]: pd.Series([pd.NaT, pd.Timestamp("2013-1-1", tz="US/Eastern")]).max()
Out[60]: Timestamp('2013-01-01 00:00:00-0500', tz='US/Eastern')

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugDtype ConversionsUnexpected or buggy dtype conversionsNumeric OperationsArithmetic, Comparison, and Logical operationsTimezonesTimezone data dtype

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions