Tô seguindo o passo a passo da aula 2, porém ao colocar o ultimo codigo está dando erro. Alguem sabe o que estou fazendo de errado?
filmes=pd.read_csv("movies.csv")
filmes.columns=["filmeId", "titulo","generos"]
filmes.head()
filmeId titulo generos
0 1 Toy Story (1995) Adventure|Animation|Children|Comedy|Fantasy
1 2 Jumanji (1995) Adventure|Children|Fantasy
2 3 Grumpier Old Men (1995) Comedy|Romance
3 4 Waiting to Exhale (1995) Comedy|Drama|Romance
4 5 Father of the Bride Part II (1995) Comedy
notas.head()
usuarioId nomeId nota momento
0 1 1 4.0 964982703
1 1 3 4.0 964981247
2 1 6 4.0 964982224
3 1 47 5.0 964983815
4 1 50 5.0 964982931
notas.query("filmeId==1")
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/pandas/core/computation/scope.py in resolve(self, key, is_local)
187 if self.has_resolvers:
--> 188 return self.resolvers[key]
189
22 frames
KeyError: 'filmeId'
During handling of the above exception, another exception occurred:
KeyError Traceback (most recent call last)
KeyError: 'filmeId'
The above exception was the direct cause of the following exception:
UndefinedVariableError Traceback (most recent call last)
/usr/local/lib/python3.7/dist-packages/pandas/core/computation/scope.py in resolve(self, key, is_local)
202 from pandas.core.computation.ops import UndefinedVariableError
203
--> 204 raise UndefinedVariableError(key, is_local) from err
205
206 def swapkey(self, old_key: str, new_key: str, new_value=None):
UndefinedVariableError: name 'filmeId' is not defined