Boa Tarde a todos, tudo bem?
Nesta atividade de plotar o gráfico catplot estou inserindo estas linhas:
total_por_lingua_de_outros_filmes = tmdb.query("original_language!= 'en'").original_language.value_counts()
sns.catplot(x = 'original_language', kind='count', data = total_por_lingua_de_outros_filmes)
e tomando este erro:
ValueError Traceback (most recent call last)
Input In [126], in <cell line: 2>()
1 total_por_lingua_de_outros_filmes = tmdb.query("original_language!= 'en'").original_language.value_counts()
----> 2 sns.catplot(x = 'original_language', kind='count', data = total_por_lingua_de_outros_filmes)
File ~\anaconda3\lib\site-packages\seaborn\_decorators.py:46, in _deprecate_positional_args.<locals>.inner_f(*args, **kwargs)
36 warnings.warn(
37 "Pass the following variable{} as {}keyword arg{}: {}. "
38 "From version 0.12, the only valid positional argument "
(...)
43 FutureWarning
44 )
45 kwargs.update({k: arg for k, arg in zip(sig.parameters, args)})
---> 46 return f(**kwargs)
File ~\anaconda3\lib\site-packages\seaborn\categorical.py:3792, in catplot(x, y, hue, data, row, col, col_wrap, estimator, ci, n_boot, units, seed, order, hue_order, row_order, col_order, kind, height, aspect, orient, color, palette, legend, legend_out, sharex, sharey, margin_titles, facet_kws, **kwargs)
3790 p = _CategoricalPlotter()
3791 p.require_numeric = plotter_class.require_numeric
-> 3792 p.establish_variables(x_, y_, hue, data, orient, order, hue_order)
3793 if (
3794 order is not None
3795 or (sharex and p.orient == "v")
3796 or (sharey and p.orient == "h")
3797 ):
3798 # Sync categorical axis between facets to have the same categories
3799 order = p.group_names
File ~\anaconda3\lib\site-packages\seaborn\categorical.py:153, in _CategoricalPlotter.establish_variables(self, x, y, hue, data, orient, order, hue_order, units)
151 if isinstance(var, str):
152 err = "Could not interpret input '{}'".format(var)
--> 153 raise ValueError(err)
155 # Figure out the plotting orientation
156 orient = infer_orient(
157 x, y, orient, require_numeric=self.require_numeric
158 )
ValueError: Could not interpret input 'original_language'
Quando substituo o 'total_por_lingua_de_outros_filmes' por 'tmdb' que é a planilha original funciona normalmente.
Conseguem me ajudar?