Closed
Description
xref #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