mirror of
https://github.com/clearml/clearml
synced 2025-02-01 01:26:49 +00:00
Fix pandas delta datetime conversion (issue #510)
This commit is contained in:
parent
4be4ba1a9a
commit
4395a419c5
@ -1,3 +1,4 @@
|
|||||||
|
import json
|
||||||
import numpy as np
|
import numpy as np
|
||||||
|
|
||||||
from ..errors import UsageError
|
from ..errors import UsageError
|
||||||
@ -501,7 +502,7 @@ def create_plotly_table(table_plot, title, series, layout_config=None):
|
|||||||
)
|
)
|
||||||
index_added = not isinstance(table_plot.index, pd.RangeIndex)
|
index_added = not isinstance(table_plot.index, pd.RangeIndex)
|
||||||
headers_values = list([col] for col in table_plot.columns)
|
headers_values = list([col] for col in table_plot.columns)
|
||||||
cells_values = table_plot.T.values.tolist()
|
cells_values = json.loads(table_plot.T.to_json(orient='values', date_format='iso'))
|
||||||
if index_added:
|
if index_added:
|
||||||
if isinstance(table_plot.index, pd.MultiIndex):
|
if isinstance(table_plot.index, pd.MultiIndex):
|
||||||
headers_values = [n or "" for n in (table_plot.index.names or [])] + headers_values
|
headers_values = [n or "" for n in (table_plot.index.names or [])] + headers_values
|
||||||
|
Loading…
Reference in New Issue
Block a user