Hi everyone, I have a dataset with two indexes but without any duplicates value. When I tried to plot this dataset as a bar chart like this:
fig = go.FigureWidget(
px.bar(
data,
x=data.index.get_level_values(0),
y="Nb",
text="Share",
text_auto=True,
color=data.index.get_level_values(1),
color_discrete_map=fig_color(data.index.get_level_values(1).unique(), "id"),
labels={
"x": input.compgap(),
"y": "Nb",
"color": input.compgap_level(),
},
),
)
Where input.compgap = data.index.get_level_values(0)
(ββ¦mentβ on the screen below) and input.compgap_level = data.index.get_level_values(1)
(-4.0 Γ 3.0 on the screen below).
I get this figure with this dataset:
Do you know why rows are duplicated? Thanks all.