duckdb:
( df1.sql.select("*,date_trunc('second',event_timestamp::datetime) event_timestamp2") .select("*,avg(value) over(partition by event_timestamp2 rows between current row and unbounded following) col1") )