Python animated line

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


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

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

Supplement: i am looking for a cumulative animation…