Hello. At first, thank you for Plotly. Its great.
Help me, if you can.
import pandas as pd
from plotly.subplots import make_subplots
import plotly.graph_objects as go
my_months = [9,9,9,10,10,10,11,11,11]
my_vls = [10, 20, 30, 20, 15, 25, 20, 30, 20]
my_names = ['one', 'two', 'three', 'one', 'two', 'three', 'one', 'two', 'three',]
test = pd.DataFrame(zip(my_months, my_names, my_vls), columns=['month','names', 'values'])
test = test.groupby(['month', 'names']).sum()
# test.head()
# here my plotly-try:
test_fig = make_subplots(rows = len(test.index.levels[0]),
                        cols = 1)
for i in test.index.levels[0]:
    local_df = test.loc[test.index.get_level_values(0)==i]
    trace = go.Bar(x = local_df.index.get_level_values(1),
                  y = local_df.values)
    test_fig.add_trace(trace)
    
test_fig.show()
plotly shows 3 subplots, but 2 of subplots are empty.
what am i doing wrong?
stackoverflow cant helps me.
p.s. sorry for my english speech - its not my natural