I'm working with this dataframe. I need to find a specific index number and, based on the inspect_date, I need to find the most recent name. I tried using the following code, but it isn't working:
last_name= df.loc[[50096379],['INSPECT_DATE','NAME']].max()['INSPECT_DATE']['NAME']
By using the following, I get the most recent date, but I don't know how to then get the most recent name:
last_name= df.loc[[50096379],['INSPECT_DATE','NAME']].max()['INSPECT_DATE']