I have a csv file that I am trying to convert into a data frame. But the data has some extra heading material that gets repeated. For example:
Results Generated Date Time
Sampling Info
Time; Data
1; 4.0
2; 5.2
3; 6.1
Results Generated Date Time
Sampling Info
Time; Data
6; 3.2
7; 4.1
8; 9.7
If it is a clean csv file without the extra heading material, I am using
df = pd.read_csv(r'Filelocation', sep=';', skiprows=2)
But I can't figure out how to remove the second set of header info. I don't want to lose the data below the second header set. Is there a way to remove it so the data is clean? The second header set is not always in the same location (basically a data acquisition mistake).
Thank you!