JSON: handling missing values in date coercion #10747

Closed
jreback opened this Issue Aug 4, 2015 · 1 comment

Comments

Projects
None yet
1 participant
Contributor

jreback commented Aug 4, 2015

xref pydata#10746

In [1]: data = '''
   ...: [{"id": 1, "timestamp": 1036713600000},
   ...:  {"id": 2}]
   ...: '''

after #10776 this is ok

In [2]: pd.read_json(StringIO(data), orient='records', dtype={'id': 'int32', 'timestamp': 'datetime64[ms]'})
Out[2]: 
   id     timestamp
0   1  1.036714e+12
1   2           NaN

In [2]: pd.read_json(StringIO(data), orient='records', dtype={'id': 'int32', 'timestamp': 'datetime64[ms]'})
Out[10]: 
   id  timestamp
0   1 2002-11-08
1   2        NaT

still open

In [7]: pd.read_json(StringIO(data), orient='records', date_unit='ms')
Out[7]: 
   id     timestamp
0   1  1.036714e+12
1   2           NaN

jreback added this to the Next Major Release milestone Aug 4, 2015

@jreback jreback modified the milestone: 0.17.0, Next Major Release Aug 21, 2015

Contributor

jreback commented Aug 24, 2015

closed by #10876

jreback closed this Aug 24, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment