I have the following dataframe:
ID Date Value
1 2010-08-01 6
1 2011-05-01 8
1 2011-12-01 7
1 2012-08-01 6
1 2013-01-01 6
1 2014-04-01 10
1 2014-08-01 8
1 2015-01-01 9
1 2016-01-01 9
1 2017-01-01 8
2 1996-01-01 5
2 1998-01-01 8
2 2010-01-01 5
2 2014-08-01 8
2 2016-01-01 8
I want to detect, for each ID, the first row that Value is equal to or exceeds a set threshold (in this case: 8) and remains over this threshold for the following observations. So, based on the data frame, the result I would like to obtain would be the following:
ID Date Value
1 2014-04-01 10
2 2014-08-01 8
I truly appreciate your help! Thanks! Let me know if you need any additional information or clarification