Using Pandas to get the closest value to a timestamp
I suppose you could create another column that is the Hour and subtract the time in question and get the absolute (unsigned) value that you could then do the min function on.. It is not code but I think the logic is right (or at least close.. after you find the mins,, then you can select them and then do your resample..
I'm using pandas to get hourly data from a dataset with fifteen minute sampling intervals.  My problem using the resample('H', how='ohlc') method is that it provides values within that hour and I want the value closest to the hour.  For instance, I would like to take a value sampled at 2:55 instead of one from 3:10, but can't figure out how to find the value that is closest if it occurs prior to the timestamp being evaluated against.
Any help would be greatly appreciated.