Repliquei exatamente o mesmo código da aula e retornou o seguinte erro ao tentar converter a coluna Preco em float:
ValueError Traceback (most recent call last) in <cell line: 0>() ----> 1 dados['preco'] = dados['preco'].astype(np.float64)
6 frames /usr/local/lib/python3.11/dist-packages/pandas/core/dtypes/astype.py in _astype_nansafe(arr, dtype, copy, skipna) 131 if copy or arr.dtype == object or dtype == object: 132 # Explicit copy, or required since NumPy can't view from / to object. --> 133 return arr.astype(dtype, copy=True) 134 135 return arr.astype(dtype, copy=copy)
ValueError: could not convert string to float: '1 000.00'
Após Reiniciar e rodar novamente o mesmo código, a conversão foi realizada.