to_iso methods for DatetimeLikeArray #28180
Labels
Datetime
Datetime data dtype
Enhancement
IO JSON
read_json, to_json, json_normalize
Needs Discussion
Requires discussion from core team before further action
to_json (and potentially others) handles the conversion of datetime-like objects to either epoch or isoformats depending on user input. All of this logic is currently housed in the objToJSON.c file and is a major reason why that extension module is rather complex / convoluted.
I think these methods may be general purpose enough to define in a vectorized manner on DatetimeLikeArrays. This wouldn't fully eliminate the need for the objToJSON.c extension module to define serialization for datetimes, timedelta and period object (as items stuck within an object array still need to be serialized), but it would definitely allow it to be more performant and move some of the logic out of the C layer back into Python
@jbrockmendel this is potentially also a precursor to #19486
The text was updated successfully, but these errors were encountered: