I don't know why this error occurs.
The code I wrote looks like this.
>>>if__name__=="_main__":
... data1 = np.genfromtxt('./ozon_sheet.csv')
... x1 = data1 [:,1]
...
Traceback (most recent call last):
File "<stdin>", line 3, in <module>
IndexError: too many indications for array
>>
I look forward to hearing from you.
python numpy
The csv file is separated by a comma, so you can specify a comma in the delimiter.
data1=np.genfromtxt('./ozon_sheet.csv', delimiter=',')
If not specified, spaces and tabs will be used as delimiters, so csv will not load as expected.
Incidentally, the first row of the csv file is the header, using names if you want to use it as a column name, or skip_header if you just want to skip it.
data1=np.genfromtxt('./ozon_sheet.csv', delimiter=',',',names=True)
data1 = np.genfromtxt('./ozon_sheet.csv', delimiter=',', skip_header=1)
567 Who developed the "avformat-59.dll" that comes with FFmpeg?
572 Understanding How to Configure Google API Key
577 PHP ssh2_scp_send fails to send files as intended
596 GDB gets version error when attempting to debug with the Presense SDK (IDE)
606 Uncaught (inpromise) Error on Electron: An object could not be cloned
© 2024 OneMinuteCode. All rights reserved.