I have a large weather report file in csv format. On reading this csv file I want some of the lines to skip at the beginning.
"Daily Weather Reports..." "Prepared..." ,"Date","Minimum temperature (�C)", ... # data here
I want to skip the lines without any data. I have many files like this. I don’t want to hardcode. How to skip these lines while reading the file?
With
open()
function we can read csv files. Using for loop andread_csv
we can read the lines till reaches the required line and return back the other lines to the df.