Код: Выделить всё
import plotly.express as px
import pandas as pd
df = pd.DataFrame({
"country": ['Poland', 'Poland', 'Poland',
'Germany', 'Germany', 'Germany',
'France', 'France', 'France'],
"city": ['Warsaw', 'Krakow', 'Gdansk',
'Berlin', 'Munich', 'Nuremberg',
'Paris', 'Marseille', 'Brest'],
"population": [1863000, 803000, 470000,
3769000, 1488000, 518000,
2103000, 877000, 140000]
})
px.histogram(df,
x="population",
facet_col="country",
labels={"population": "Population"},
title="Areas per country")
Как избавиться от "country=" в заголовках?
Подробнее здесь: https://stackoverflow.com/questions/798 ... ains-label