mirror of
https://github.com/apache/superset.git
synced 2024-09-12 00:29:39 -04:00
fix: epoch_s and epoch_ms to date time (#4664)
This commit is contained in:
parent
ec069676fd
commit
b9965230df
@ -155,7 +155,8 @@ class BaseViz(object):
|
||||
else:
|
||||
if DTTM_ALIAS in df.columns:
|
||||
if timestamp_format in ('epoch_s', 'epoch_ms'):
|
||||
df[DTTM_ALIAS] = pd.to_datetime(df[DTTM_ALIAS], utc=False)
|
||||
df[DTTM_ALIAS] = pd.to_datetime(
|
||||
df[DTTM_ALIAS], utc=False, unit=timestamp_format[6:])
|
||||
else:
|
||||
df[DTTM_ALIAS] = pd.to_datetime(
|
||||
df[DTTM_ALIAS], utc=False, format=timestamp_format)
|
||||
|
Loading…
Reference in New Issue
Block a user