Skip to content

Timestamp.min and .max return a Python datetime object that is not a valid Timestamp #3863

Closed
@SleepingPills

Description

@SleepingPills
import pandas as pd

pd.Timestamp(pd.Timestamp.min)

Throws: ValueError: Out of bounds nanosecond timestamp: 1-01-01 00:00:00

Pandas version: 0.11.1_dev
Numpy version: 1.7.1

The the min and max methods on the Timestamp class return simple Python datetime objects, but more importantly they do not adhere to the limitations of Timestamps. They return the default datetime(1,1,1) and datetime(9999, 12, 31, 23, 59, 59, 999999) respectively - both of which are well outside of the valid Timestamp range.

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