Let's say I have a dataframe with this structure
and I intend to transform it into something like this (done laboriously and quite manually):
Is there a simple call to (say) a seaborn or plotly function that would do this? Something like
heatmap(df, x='Dose', y='Distance', z='Passrate')
or perhaps a simple way of restructuring the dataframe to facilitate using sns.heatmap or plotly's imshow, or similar? It seems strange to me that I cannot find a straightforward way of putting data formatted in this way into a high-level plotting function.
CodePudding user response: