There are a few other questions regarding the same subject, but the format desired is different in all.
I am trying to build a heatmap visualization using holoviews
With iterators and list comprehention:
my_list = [] for row in df.iterrows(): my_list.extend([(row[0], i, v) for i, v in row[1].iteritems()])