Prezados(as),
Estou tentando resolver o desafio do item 10, aula 2 (exploração dos dados), curso NumPy: análise numérica eficiente com Python. Porém , ao tentar importar o arquivo do github para o colab, aparece o seguinte erro:
#Código:
import numpy as np url = 'https://raw.githubusercontent.com/Heltonssilva/dados/main/citrus.csv' dado = np.loadtxt(url, delimiter=',', usecols=np.arange(1, 100002, 1))
#Erro:
ValueError Traceback (most recent call last) ValueError: could not convert string to float: 'diametro'
The above exception was the direct cause of the following exception:
ValueError Traceback (most recent call last) in <cell line: 1>() ----> 1 dado = np.loadtxt(url, delimiter=',', usecols=np.arange(1, 100002, 1))
/usr/local/lib/python3.10/dist-packages/numpy/lib/npyio.py in _read(fname, delimiter, comment, quote, imaginary_unit, usecols, skiplines, max_rows, converters, ndmin, unpack, dtype, encoding) 997 998 if read_dtype_via_object_chunks is None: --> 999 arr = _load_from_filelike( 1000 data, delimiter=delimiter, comment=comment, quote=quote, 1001 imaginary_unit=imaginary_unit,
ValueError: could not convert string 'diametro' to float64 at row 0, column 2.
Como resolver este erro?