In pandas, how can I write a rolling window that has preceding as well as following rows?
for example, a sql rolling window can be written as follows:
sum(id_0) over (partition by id_1 order by id_2 rows between 3 preceding and 1 following)
i am not sure how to write this in pandas.