-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
BugIO JSONread_json, to_json, json_normalizeread_json, to_json, json_normalizeTimezonesTimezone data dtypeTimezone data dtype
Milestone
Description
Seemingly related but not identical to #12997
How to reproduce the bug
Checked with pandas 0.24.2, 1.1.5 and 1.2.0.
import pandas as pd
index = pd.date_range(
start='2020-12-28 00:00:00',
end='2020-12-28 02:00:00',
freq='1H',
)
a = pd.Series(
data=range(3),
index=index,
)
a.to_json(date_format='iso')
Output
'{"2020-12-28T00:00:00.000Z":0,"2020-12-28T01:00:00.000Z":1,"2020-12-28T02:00:00.000Z":2}'
(Notice the "Z" indicating UTC)
Expected output
'{"2020-12-28T00:00:00.000":0,"2020-12-28T01:00:00.000":1,"2020-12-28T02:00:00.000":2}'
(without "Z")
thomasnal, connesy, sebtrack and oliverw1
Metadata
Metadata
Assignees
Labels
BugIO JSONread_json, to_json, json_normalizeread_json, to_json, json_normalizeTimezonesTimezone data dtypeTimezone data dtype