The Dataframe
import pandas as pd
import plotly.express as px
df = pd.DataFrame({"A":[1,2,3],"B":[4,5,6]})
print(df)
A B
0 1 4
1 2 5
2 3 6
transformed into a heatmap using
fig = px.density_heatmap(df)
fig.show()
results in
What I actually want, is the index (0,1,3) on the x-axis, column names (A,B) on the y axis and the actual cell values represented by colors, as a third dimension. How can I get that representation?