Python animated line

Hi, i am new to plotly. i try to change the example code to animate a line plot

Code:

gapminder = px.data.gapminder().query(“country==‘Canada’”)
fig = px.line(gapminder, x=“year”, y=“lifeExp”, animation_frame=‘year’, title=‘Life expectancy in Canada’)
fig.show()

but the plot don t show the line. Thanks for a short help!!!

Supplement: i am looking for a cumulative animation…