ValueError:('长度必须匹配以比较'(120,),(1,))
如何根据插入dcc.dropdown中插入的值显示数据(... value = ['01/01/2022])
?
当前,图表中没有基于插入的值显示的数据,并按照以下出现错误消息:
错误消息:valueerror :('长度必须匹配以比较',(120,),(1,)
)知道如何解决吗?
date_category = list(df['Date'].unique())
app.layout = dbc.Container([
dbc.Row([
dcc.Dropdown(id='date_drdn', multi=False, value= ['01/01/2022'],
options = [{'label':x, 'value':x}
for x in date_category]
How to display the data based on the value which inserted in thedcc.Dropdown(...value=['01/01/2022])
?
Currently, there is no data displayed in the chart based on the value inserted and come out error message as per below:
Error message: ValueError: ('Lengths must match to compare', (120,), (1,))
Does anyone know how to solve it?
date_category = list(df['Date'].unique())
app.layout = dbc.Container([
dbc.Row([
dcc.Dropdown(id='date_drdn', multi=False, value= ['01/01/2022'],
options = [{'label':x, 'value':x}
for x in date_category]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
答:
删除[]
示例:值= '01/01/2022'
Answer:
Remove the [ ]
example: value= '01/01/2022'