read_json support for orient="table" by WillAyd · Pull Request #19039 · pandas-dev/pandas (original) (raw)

This is a starting point for read_json supporting orient='table' for basic types. I'm explicitly raising in the instances that don't work, namely timezone aware datetimes andTimedelta. I marked floats with no decimal values as an xfail (these are being converted to int64 by the _try_convert_data method).

Timedelta would be best fixed in a separate change providing a constructor equivalent to the isoformat method (see #19040).

The new tests could also all be parametrized, but I've kept as is before going too far with this change in case of feedback