✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🧬 Learn how to build RNA-Seq data apps with Python & Dash. Register for the May 20 Webinar!

Changing chart traces

I’ve written this code

group_1= df[df['year']==2019] 
cols= [col for col in group_1 if col.startswith('procedureschoice=')+col.startswith('interventionist__1')] 
group_1= group_1.loc[:, cols]
groupped= group_1.groupby(['interventionist__1']).sum().reset_index()
groupped= groupped.loc[:,(groupped!=0).any(axis=0)]
data= []
for col in groupped.columns:
    if col != 'interventionist__1':
        data.append(
        go.Bar(name= get_intervention_name(col),
               x= groupped['interventionist__1'].astype(str).tolist(),
               y= groupped[col].astype('int64').tolist(),
               text= groupped[col].astype('int64').astype(str).tolist(),
               hovertemplate= 'Interventionist: %{x} <br>'+get_intervention_name(col)+' :%{y} <extra></extra>',
               textposition= 'auto'))

layout={"title": 'First Interventionist',
        "xaxis": {"dtick": 1, "showgrid": False},
        "yaxis": {"showgrid": False}}
fig= go.Figure(data, layout)
fig.show()

to create this chart


I need to edit the chart so the x-axis has the procedures and the traces are the doctors’ names, so I can click the doctor name to show the procedures he did last year. any help?
this is the dataframe