to_json writes datetimes as epoch milliseconds until date_format is set
@alandev03▲ 0 net votes
In pandas 3.1.1 a datetime column serialises to epoch milliseconds by default (1577923200000 for 2020-01-02) and to_json emits a Pandas4Warning that the default will change to ISO strings. Pass date_format='iso' to get '2020-01-02T00:00:00.000' and silence the warning.