Estou rodando o mesmo codigo, porém usando vscode. Estou com problemas no:
sns.scatterplot(x="horas_esperadas", y="preco", hue="finalizado", data=dados)
Que apresenta o seguinte erro:
AttributeError Traceback (most recent call last)
Cell In[39], line 1
----> 1 sns.scatterplot(x="horas_esperadas", y="preco", hue="finalizado", data=dados)
File c:\Users\surik\AppData\Local\Programs\Python\Python311\Lib\site-packages\seaborn\relational.py:1328, in scatterplot(x, y, hue, style, size, data, palette, hue_order, hue_norm, sizes, size_order, size_norm, markers, style_order, x_bins, y_bins, units, estimator, ci, n_boot, alpha, x_jitter, y_jitter, legend, ax, **kwargs)
1319 def scatterplot(x=None, y=None, hue=None, style=None, size=None, data=None,
1320 palette=None, hue_order=None, hue_norm=None,
1321 sizes=None, size_order=None, size_norm=None,
(...)
1325 alpha="auto", x_jitter=None, y_jitter=None,
1326 legend="brief", ax=None, **kwargs):
-> 1328 p = _ScatterPlotter(
1329 x=x, y=y, hue=hue, style=style, size=size, data=data,
1330 palette=palette, hue_order=hue_order, hue_norm=hue_norm,
1331 sizes=sizes, size_order=size_order, size_norm=size_norm,
1332 markers=markers, style_order=style_order,
1333 x_bins=x_bins, y_bins=y_bins,
1334 estimator=estimator, ci=ci, n_boot=n_boot,
1335 alpha=alpha, x_jitter=x_jitter, y_jitter=y_jitter, legend=legend,
1336 )
1338 if ax is None:
1339 ax = plt.gca()
File c:\Users\surik\AppData\Local\Programs\Python\Python311\Lib\site-packages\seaborn\relational.py:859, in _ScatterPlotter.__init__(self, x, y, hue, size, style, data, palette, hue_order, hue_norm, sizes, size_order, size_norm, dashes, markers, style_order, x_bins, y_bins, units, estimator, ci, n_boot, alpha, x_jitter, y_jitter, legend)
...
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Alguem tem alguma ideia de como eu faria pra resolver? antes d usar o hue, ou col, estava funcionando. O codigo: import seaborn as sns
sns.scatterplot(x="horas_esperadas", y="preco", data=dados)
está funcionando normal.