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
{{ message }}
This repository was archived by the owner on Jun 3, 2024. It is now read-only.
I often use the DataFrame index for something meaningful, such as a timestamp corresponding to when the data was taken, or a sequence number. In those cases, it'd be great to be able to use that in plotly express to determine the X value, data color, text label, etc.
Currently the workaround is to copy the index to a separate column, e.g.
# Contrived example, but this usually comes from some other systemdf=pd.DataFrame({'y': [1,2,3]}, index=[4,5,6])
df['x'] =df.indexpx.scatter(df, x=px.INDEX, y='y')
Instead of having to change the DataFrame, it would be nice if I could just go ahead and do something like