Skip to content

BUG: unpickle of Timestamp should not generate deprecation warning #41949

Closed
@jorisvandenbossche

Description

@jorisvandenbossche

Currently we give a deprecation warning when unpickling:

In [10]: idx = pd.date_range("2012", periods=3, freq="D")

In [11]: res = pickle.dumps(idx[0])

In [12]: pickle.loads(res)
/home/joris/miniconda3/envs/dev/bin/ipython:1: FutureWarning: The 'freq' argument in Timestamp is deprecated and will be removed in a future version.
  #!/home/joris/miniconda3/envs/dev/bin/python
Out[12]: Timestamp('2012-01-01 00:00:00', freq='D')

We should ensure that unpickling a Timestamp does not generate a warning, only if the user afterwards accesses the freq as normal it should warn.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BlockerBlocking issue or pull request for an upcoming releaseBugDatetimeDatetime data dtypeDeprecateFunctionality to remove in pandas

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions