I have this csv which contains:
"""START
ABC
XYZ
START OF DATA
"COL1","COL2","COL3"
"1","2","3"
END OF DATA
LMN
NUMBER-OF-RECORDS=1
OPQ"""
I want data frame that looks like:
COL1 COL2 COL3
1 2 3
basically whatever is contained in between START OF DATA and END OF DATA.
I tried doing:
df = pd.read_csv(file_name,header=4,skipfooter=4)
this works but I dont like the idea of harcoding the values as the header or the footer might change. The only way I see best is to get data between those two keywords and put it into a dataframe.
How can I do this?