how to get smallest index in dataframe after using groupby

If create_date field does not correspond to period between from_date and to_date, I want to extract only the large index records using group by ‘indicator’ and record correspond to period between from_date to end_date. from_date = ‘2022-01-01’ to_date = ‘2022-04-10’ indicator create_date 0 A 2022-01-03 1 B 2021-12-30 2 B 2021-07-11 3 C 2021-02-10 4… Read More how to get smallest index in dataframe after using groupby