Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API: unpickle problems with pd.NaT #4606

Closed
mariusvniekerk opened this issue Aug 19, 2013 · 1 comment
Closed

API: unpickle problems with pd.NaT #4606

mariusvniekerk opened this issue Aug 19, 2013 · 1 comment
Labels
Dtype Conversions Unexpected or buggy dtype conversions Internals Related to non-user accessible pandas implementation IO Data IO issues that don't fit into a more specific label Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Milestone

Comments

@mariusvniekerk
Copy link

Error when reading a pickled pd.NaT value.

Example

In [1]: import pandas as pd

In [2]: test_val = pd.NaT

In [3]: from cPickle import loads, dumps

In [4]: loads(dumps(test_val))
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-12-8e4233b9b57a> in <module>()
----> 1 loads(dumps(pd.NaT))

TypeError: ('__new__() takes exactly one argument (2 given)', <class 'pandas.tslib.NaTType'>, ('\x00\x01\xff\xff\x00\x00\x00\x00\x00\x00',))

For the more common usage case

loads(dumps(pd.to_datetime(['2013-01-01', pd.NaT, '2014-01-06'])))

works as expected.

@jreback
Copy link
Contributor

jreback commented Mar 31, 2014

closed by #6742

@jreback jreback closed this as completed Mar 31, 2014
@jreback jreback modified the milestones: 0.14.0, 0.15.0 Mar 31, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dtype Conversions Unexpected or buggy dtype conversions Internals Related to non-user accessible pandas implementation IO Data IO issues that don't fit into a more specific label Missing-data np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants