I need to read in lots of sounding data that the columns in those data have different length (see the attached sounding file https://drive.google.com/open?id=1GVaKdp6J47nS_yDc1LEDnAAxeGF7lpZT): the first 3 rows have only 3 columns while the rest of rows have 11 columns
I tried reading them using pandas.read_csv
:
data = pd.read_csv('DNR-910.txt', skiprows = 5, header = None, delimiter= '\s+')
and I got:
ParserError: Error tokenizing data. C error: Expected 2 fields in line 9, saw 11
My problem is actually similar to this post : read txt file with different number of columns, but it is solved in R