I have a timestamp taken from a list, and I need to find a row in pandas dataframe that is closest to the timestamp that I have, even a group of rows is fine for me. Here is the sample dataframe
0 6160 Upper 12-7-2019 12:37:51.123572
1 6162 Upper 12-7-2019 12:39:22.355725
2 6175 Upper 12-7-2019 13:21:15.224157
3 6180 Upper 13-7-2019 06:04:29.157111
4 6263 Upper 13-7-2019 07:37:51.123572
and I have a timestamp
datetime.datetime(12,7,2019,16,41,20)
So I need it to catch a row at index 2 in this case.
your help is appreciated. Thanks