I have a large CSV file that has a number of columns, along with a Timestamp
column. The file is sorted in ascending order of timestamps.
I want to read these values into a pandas dataframe, but only within a specific timestamp range, say from 4:00pm to 5:00pm on a particular date.
What would be the most efficient way to do this? The file is very large, and I want to avoid going through it entirely, since it is sorted I want it to cut off when the upper timestamp is reached, and also want to avoid manual splitting by ,
, is there a way to do this using pandas read_csv
function?
import pandas as pd
df = pd.read_csv('csvfile', header='infer', ???)