'ValueError: Cannot accept list of column references or list of columns for both `x` and `y`
I am not able to get the heatmap in Plotly and getting ValueError: Cannot accept list of column references
def update_graph(xaxis_column_name, yaxis_column_name,value):
dff = df[df['Year'] == value]
fig = px.density_heatmap(
x=dff[dff['Population'] == xaxis_column_name]['Pop. Density (per sq. mi.)'],
y=dff[dff['Area (sq. mi.)'] == yaxis_column_name]['Pop. Density (per sq. mi.)'],
text_auto=True,
hover_name=dff[dff['Country'] == yaxis_column_name]['Region'])
return fig
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
