Okay I'm new to python but have to use it for my physics class. Basically I don't get my error loading data from a .dat file
The .dat file looks something alike
; line 8
; time (s) motorpos (steps) azimuth (deg) signal_magnitude
0.90 0 0.000 1.24230e-01
3.07 6000 3.000 1.24530e-01
5.27 12000 6.000 1.23240e-01
7.55 18000 9.000 1.23330e-01
My modest try was
import numpy as np
import matplotlib.pyplot as plt
data = np.genfromtxt('Data.dat', comments=';', skip_header=8, skip_footer=1, names=True, type=None)
print(data)
But i got:
Line #10 (got 4 columns instead of 7)
I guess my problem is that I use the wrong delimiter, but "by default, any consecutive whitespaces should act as delimiter." So I'm kind of lost here
namesargument set to a list of strings ingenfromtxt.