I am trying to detect if a value is repeated for two months in a row, on the same day, but I am not able to find a way without iterating through all the rows. The problem with iterating is that it makes it impossibly slow.
My Table:
date country cur amount
0 2019-01-07 LTU EUR 150.00
1 2019-01-08 LTU EUR 50.00
2 2019-01-02 LTU EUR 561.60
3 2019-01-02 LTU EUR 990.14
4 2019-01-02 LTU EUR 700.00
5 2019-02-07 LTU EUR 150.00
What I am trying to achieve:
date country cur amount monthly
0 2019-01-07 LTU EUR 150.00 True
1 2019-01-08 LTU EUR 50.00 False
2 2019-01-02 LTU EUR 561.60 False
3 2019-01-02 LTU EUR 990.14 False
4 2019-01-02 LTU EUR 700.00 False
5 2019-02-07 LTU EUR 150.00 True
The value 150.00 in the EUR currency is repeated on the same day of the next month.
Thanks!