Open H4dr1en opened 1 year ago
Task logger flattens pandas dataframes pivoted in the WebUI
from clearml import Task import pandas as pd df = pd.DataFrame({'foo': ['one', 'one', 'one', 'two', 'two', 'two'], 'bar': ['A', 'B', 'C', 'A', 'B', 'C'], 'baz': [1, 2, 3, 4, 5, 6], 'zoo': ['x', 'y', 'z', 'q', 'w', 't']}) df_pivot = df.pivot(index='foo', columns='bar', values=['baz', 'zoo']) task.get_logger().report_table("df_pivot", "df_pivot", 0, df_pivot)
The table is logged with the same multi index (columns) layers as the str representation:
>>> df_pivot baz zoo bar A B C A B C foo one 1 2 3 x y z two 4 5 6 q w t
But in the WebUI, the table has all the columns flattened:
Thanks @H4dr1en, we'll let you know once this is solved
Describe the bug
Task logger flattens pandas dataframes pivoted in the WebUI
To reproduce
Expected behaviour
The table is logged with the same multi index (columns) layers as the str representation:
But in the WebUI, the table has all the columns flattened:
Environment