Skip to content

Timezone info is lost when pickling datetime indices #8367

Closed
@edrevo

Description

@edrevo
>>> c.head(3)
                                                           end_time
location_id sensor_id view_id start_time
54          1000305   0       2014-07-21 07:00:00+00:00    2014-07-21 07:15:00+00:00
                              2014-07-21 07:15:00+00:00    2014-07-21 07:30:00+00:00
                              2014-07-21 07:30:00+00:00    2014-07-21 07:45:00+00:00

>>> c.to_pickle(r"C:\temp\fff")
>>> pd.read_pickle(r"C:\temp\fff").head(3)
                                                   end_time
location_id sensor_id view_id start_time
54          1000305   0       2014-07-21 07:00:00  2014-07-21 07:15:00+00:00
                              2014-07-21 07:15:00  2014-07-21 07:30:00+00:00
                              2014-07-21 07:30:00  2014-07-21 07:45:00+00:00

Please note that the timezone is lost from start_time.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugCompatpandas objects compatability with Numpy or Python functionsMultiIndexTimezonesTimezone data dtype

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions