I have a real time system that generates csv files almost every 2 minutes; the acquisition time can vary from 1.5 to 4 minutes. The name of csv files are the current timestamp. I am looking for an efficient way in python to find the csv file that has 24 hours time difference with the current csv file and if there is not a file with exact 24 hours difference, find the one closest to 24 hours. Any suggestion would be highly appreciated!I think this might be possible using pandas to_datetime and Timedelta but could not think of an efficient way to do this.