Код: Выделить всё
import plotly.express as px
import pandas as pd
df = pd.DataFrame([
dict(Task="Job A", Start='2009-01-01', Finish='2009-02-28', Worker='Alex'),
dict(Task="Job B", Start='2009-03-05', Finish='2009-04-15', Worker='John'),
dict(Task="Job A", Start='2009-02-20', Finish='2009-05-30', Worker='Marc')
])
fig = px.timeline(df, x_start="Start", x_end="Finish", y="Task", color="Worker")
fig.update_yaxes(autorange="reversed")
fig.show()
Подробнее здесь: https://stackoverflow.com/questions/786 ... s-timeline