I'm fairly new to coding (and this type of website) and right now I'm having difficulties with python. I need python to read data from a CSV file:
Here's a snippet of my code:
import numpy as np
data = np.loadtext('Users/User/Documents/Data.csv', delimiter=',')
firstrow = data[0:,]
Here is just a sample of the CSV (the actual file is very large and contains a row of 2000+ numbers)
2 -2 2 5 -4 -2 0 4 -5
I want python to read the first row of the file but whenever I run the program it is always saying "could not convert string to float". I don't understand what the problem is here and how I can fix it without making a new file (as mentioned before the file is very very large and it would take me a very long time to remake) but any help would be very much appreciated, thanks!