load_labone_csv#
- load_labone_csv(fname: str) ndarray [source]#
Load a csv file generated from LabOne.
Load a CSV file containing generic data as saved by the LabOne User Interface into a numpy structured array.
- Parameters:
filename – The filename of the CSV file to load.
fname (str) –
- Returns:
A numpy structured array of shape (num_points,) whose field names correspond to the column names in the first line of the CSV file. num_points is the number of lines in the CSV file - 1.
- Return type:
ndarray
Example
>>> import zhinst.utils >>> # Load the CSV file of PID error data (node: /dev2004/pids/0/error) >>> data = zhinst.utils.load_labone_csv('dev2004_pids_0_error_00000.csv') >>> import matplotlib.pyplot as plt >>> # Plot the error >>> plt.plot(data['timestamp'], data['value'])