Here is an image of the text file:
Advertisement
Answer
Try using pd.read_csv
and some parameters:
JavaScript
x
9
1
df = pd.read_csv('data.csv', skiprows=3, header=None, sep='s+', comment=',',
2
names=['z', 'tz', 'tL', 'DA', 'DL'])
3
print(df)
4
5
# Output
6
z tz tL DA DL
7
0 0.001 13.3 0.1 42.3 43.2
8
1 0.100 12.2 1.3 380.4 460.3
9
Content of data.csv
:
JavaScript
1
6
1
;###
2
Omegavac
3
;;;;
4
0.001 13.3 0.1 42.3 43.2,,,,
5
0.1 12.2 1.3 380.4 460.3,,,,
6