I made a line chart with way too many lines to neatly display and I need to be able to select a grouping variable (Province) and have it just display the lines in that province (I have a Province column in the data that says what Province it belongs to). For example, I would click "Ontario" in the dropdown and just the lines corresponding to Toronto and Ottawa etc would show up. What am I doing wrong?
import plotly.express as px
import plotly.offline as pyo
import pandas as pd
import plotly.graph_objects as go
df = pd.read_csv('....csv')
fig_opend = px.line(data_frame = df, x='Round', y='Excess Demand For Plot', title= 'Canada', color='Product' ,
hover_name='Service Area Name', hover_data=['Product Number', 'Excess Demand', '(Initial) Supply', 'Aggregate Demand', 'Round'])
fig_opend.update_yaxes(title = 'Excess Demand')
fig_opend.update_layout(margin={"r":20,"t":27,"l":10,"b":10}, xaxis={'tickformat':',d'})
updatemenus = [dict(buttons_open=list([dict(method='update', args=[{'y':[df.loc[df_opend['Areas'] == 'West']]}],),]),direction="down",showactive=True)]
fig_opend.update_layout(updatemenus=updatemenus)


