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