Segui os passos da professora, e até colei o codigo direto da transcrição, mas sempre sai esse erro:
ImportError Traceback (most recent call last)
Cell In[49], line 1
----> 1 df_preco_tipo.plot(kind='barh', figsize=(14, 10), color='purple')
File ~\anaconda3\Lib\site-packages\pandas\plotting\_core.py:895, in PlotAccessor.__call__(self, *args, **kwargs)
894 def __call__(self, *args, **kwargs):
--> 895 plot_backend = _get_plot_backend(kwargs.pop("backend", None))
897 x, y, kind, kwargs = self._get_call_args(
898 plot_backend.__name__, self._parent, args, kwargs
899 )
901 kind = self._kind_aliases.get(kind, kind)
File ~\anaconda3\Lib\site-packages\pandas\plotting\_core.py:1862, in _get_plot_backend(backend)
1859 if backend_str in _backends:
1860 return _backends[backend_str]
-> 1862 module = _load_backend(backend_str)
1863 _backends[backend_str] = module
1864 return module
File ~\anaconda3\Lib\site-packages\pandas\plotting\_core.py:1794, in _load_backend(backend)
1792 module = importlib.import_module("pandas.plotting._matplotlib")
1793 except ImportError:
-> 1794 raise ImportError(
1795 "matplotlib is required for plotting when the "
1796 'default backend "matplotlib" is selected.'
1797 ) from None
1798 return module
1800 found_backend = False
ImportError: matplotlib is required for plotting when the default backend "matplotlib" is selected.
Tentei importar o matplotlib e depois correr o codigo de novo, sem sucesso.