I have DataFrame like below:
rng = pd.date_range('2020-12-01', periods=5, freq='D')
df = pd.DataFrame({"ID" : ["1", "2", "1", "1", "2"],
"Date" : rng,
"kind" : ["active", "not_active", "active", "active", "not_active"],
"status" : ["b2", "b2", "g8", "g8", "v10"]})
And i need to create DataFrame which will show what was the status of the last active and the last not active agreement. Below I upload example of result:
