我似乎弄不懂文件。基本上我想创建一个下拉菜单,每个选择输出一个不同的图表。这是一个MRE。plotly.express作为px导入
race = pd.read_csv('https://github.com/ngpsu22/Ed_Debt-vs.-UBI/raw/main/race_debt_ubi')
education = pd.read_csv('https://github.com/ngpsu22/Ed_Debt-vs.-UBI/raw/main/education_debt_ubi')
income = pd.read_csv('https://github.com/ngpsu22/Ed_Debt-vs.-UBI/raw/main/income_debt_ubi')
fig_race = px.bar(race, x='race', y='percent_has_debt', text='percent_has_debt')
fig_education = px.bar(education, y='percent_has_debt', text='percent_has_debt')
fig_income = px.bar(income, y='percent_has_debt', text='percent_has_debt')
基本上,我想创建一个下拉菜单[‘种族’、‘教育’、‘收入’],输出相应的图表
我已将您的数据制作成一个图形,您可以在“plotly”中的“go”下拉列表中选择该图形。默认设置是显示所有值。我在官方{a1}和{a2}的帮助下修改了它
相关问题 更多 >
编程相关推荐