-werners-
Esteemed Contributor III

ok so each time you do an action, the code for your df is executed.

I suspect if you clear state between the two cells that your issue is gone.

Or try to assign to a new dataframe like

df2 = add_time_from_filename(df, 'referential')