def find_closest_frame(utc, timestamp):
    """
    Takes timestamp as datetime object, returns the frame number corresponding to the cloest frame to that time
    Briefly sets the index to datetime column, then sets it back
    """
    index_holder = utc.index
    utc.index = utc.datetime
    closest_loc = utc.index.get_loc(timestamp, method = "nearest")
    utc.index = index_holder
    return closest_loc