You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
then i run this code below i get:
ValueError: Value of 'hover_data_1' is not the name of a column in 'data_frame'. Expected one of ['start_x', 'end_y', 'Hoverdata', 'H', 'y'] but received: o
Darn i through it was bug. Closeing this One.
Idea
px.timeline(overwrite_hoverdata=columb in dataframe)
px.timeline(append_hoverdata=columb in dataframe)
then i run this code below i get:
ValueError: Value of 'hover_data_1' is not the name of a column in 'data_frame'. Expected one of ['start_x', 'end_y', 'Hoverdata', 'H', 'y'] but received: o
#pip install plotly
#pip install pandas
#pip install xlrd
import plotly.express as px
import pandas as pd
df=pd.read_excel('bug.xls')
print(df)
fig=px.timeline
(data_frame=df,
x_start='start_x',
x_end='end_y',
y='y',
hover_data='Hoverdata',
#hover_data='H',
)
fig.show()
but if i run this code it work.
#pip install plotly
#pip install pandas
#pip install xlrd
import plotly.express as px
import pandas as pd
df=pd.read_excel('bug.xls')
print(df)
fig=px.timeline
(data_frame=df,
x_start='start_x',
x_end='end_y',
y='y',
#hover_data='Hoverdata',
hover_data='H',
)
fig.show()
custom_data behaves the same way.
this is the df data i used
start_x end_y Hoverdata H y
0 2021-03-05 2020-05-16 00:00:00 text1 text1 name1
1 2021-03-06 2009-06-04 15:45:00 text2 text2 name2
2 2021-03-07 2009-06-04 15:45:00 text3 text3 name3
3 2021-03-08 2020-05-04 00:00:00 text4 text4 name4
4 2021-03-09 2020-05-06 00:00:00 text5 text5 name5
5 2021-03-10 2020-05-07 00:00:00 text6 text6 name6
6 2021-03-11 2020-05-07 00:00:00 text7 text7 name7
7 2021-03-12 2020-05-06 00:00:00 text8 text8 name8
8 2021-03-13 2019-05-13 00:00:00 text9 text9 name9
9 2021-03-14 2018-06-18 00:00:00 text10 text10 name10
The text was updated successfully, but these errors were encountered: