I have a multi indexed dataframe sorted by name and date and time and i would like to go through the dataframe to select the latest(time wise) row for each day. see example below:
name time code
Trudy 1/2/2018 2:36PM 126-45
1/2/2018 3:58PM 127-45
1/3/2018 5:25PM 122-56
1/4/2018 6:57PM 122-57
1/4/2018 9:25PM 122-89
Monk 1/2/2018 3:58PM 147-56
1/3/2018 4:20PM 258-69
1/3/2018 5:25PM 259-87
1/6/2018 6:57PM 254-69
Natalie 1/2/2018 5:21PM 148-35
1/2/2018 3:54PM 458-69
1/4/2018 2:26PM 249-47
and i want to get the following result :
name time code
Trudy 1/2/2018 3:58PM 127-45
1/3/2018 5:25PM 122-56
1/4/2018 9:25PM 122-89
Monk 1/2/2018 3:58PM 147-56
1/3/2018 5:25PM 259-87
1/6/2018 6:57PM 254-69
Natalie 1/2/2018 5:21PM 148-35
1/4/2018 2:26PM 249-47