[Python] what is this error and how can i solve this error [closed]

Discussão em 'Python' iniciado por Stack, Maio 13, 2025.

  1. Stack

    Stack Membro Participativo

    ---------------------------------------------------------------------------
    TypeError Traceback (most recent call last)
    <ipython-input-20-fdc91464740e> in <cell line: 0>()
    ----> 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'

    Continue reading...

Compartilhe esta Página