Skip to content

Commit

Permalink
Sanitize pyarrow-backed timestamp columns to ISO8601 string
Browse files Browse the repository at this point in the history
  • Loading branch information
jonmmease committed Jul 28, 2023
1 parent e62cd6c commit eebb4f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion altair/utils/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ def to_list_if_array(val):
# https://pandas.io/docs/user_guide/boolean.html
col = df[col_name].astype(object)
df[col_name] = col.where(col.notnull(), None)
elif dtype_name.startswith("datetime"):
elif dtype_name.startswith("datetime") or dtype_name.startswith("timestamp"):
# Convert datetimes to strings. This needs to be a full ISO string
# with time, which is why we cannot use ``col.astype(str)``.
# This is because Javascript parses date-only times in UTC, but
Expand Down

0 comments on commit eebb4f4

Please sign in to comment.