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)
848 M2 Mac fails to install rbenv install 3.1.3 due to errors
801 GDB gets version error when attempting to debug with the Presense SDK (IDE)
919 Uncaught (inpromise) Error on Electron: An object could not be cloned
1343 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2025 OneMinuteCode. All rights reserved.