Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 13951

Check if value stays the same for 10 consecutive days

$
0
0

I have an input like this:

Date        X    Y  Value2024-01-10  X1  123 12024-01-11  X1  123 32024-01-12  X1  123 22024-01-13  X1  123 52024-01-14  X1  123 62024-01-15  X1  123 22024-01-16  X1  123 22024-01-17  X1  123 22024-01-18  X1  123 32024-01-19  X1  123 22024-01-20  X1  123 22024-01-10  X2  456 42024-01-11  X2  456 42024-01-12  X2  456 42024-01-13  X2  456 42024-01-14  X2  456 42024-01-15  X2  456 42024-01-16  X2  456 42024-01-17  X2  456 42024-01-18  X2  456 42024-01-19  X2  456 42024-01-20  X2  456 4

Id like to get output only where Value didn't change for 10 consecutive days, based on X and Y combination

In this example the output I would like to get would be:

Date        X    Y    Value2024-01-20  X2  456    4. 

This date specifically because the date is newest.


Viewing all articles
Browse latest Browse all 13951

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>