Code: Select all
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
in ()
----> 1 df_2020['genres'] = df_2020['Title'].map(lambda x: get_genre(str(x)))
5 frames
lib.pyx in pandas._libs.lib.map_infer()
/usr/local/lib/python3.11/dist-packages/tmdbv3api/as_obj.py in __getitem__(self, key)
45 return self._obj_list[key]
46 else:
---> 47 return getattr(self, key)
48
49 def __iter__(self):
TypeError: attribute name must be string, not 'int'