Hi All,
Is it possible to create a heatmap based on the values in a dataframe rather than the size? Canโt seem to find any documentation that covers this. Thanks!
Hi All,
Is it possible to create a heatmap based on the values in a dataframe rather than the size? Canโt seem to find any documentation that covers this. Thanks!
Hi @jrotta,
You can define a heatmap whose z-values are read from a daframe column, but its values must be reshaped to a 2d array. Something like this:
df = pd.DataFrame({'z': np.random.randint(2,13, 300).astype(float)})
fig = go.Figure(go.Heatmap( z=df['z'].values.reshape((20,15)), colorscale='matter'))