I have a dataframe which looks like this
customerId Date Amount_Spent
123 01/01/2018 500
456 01/01/2018 250
123 02/01/2018 300
456 02/01/2018 100
I want to count customers (distinct/non-distinct) who have spent more than 200 on two consecutive days.
So I expect to get
customerId Date1 Date2 Total_Amount_Spent
123 01/01/2018 02/01/2018 800
Can someone help me with this?