[Python] TypeError: category dtype does not support aggregation 'mean' for Movies

Discussão em 'Python' iniciado por Stack, Fevereiro 15, 2025.

  1. Stack

    Stack Membro Participativo

    I used these codes using the groupby() function to find the top averages, budgets, revenue etc. for movies as part of my Exploratory Data Analysis:

    movies = df.groupby('Title')

    movies.mean().sort_values(by='TMDB Vote Average', ascending=False).head()

    This worked on older versions of Anaconda or Jupyter Notebook but I cannot understand why it is not working on the latest version of Anaconda or Jupyter Notebook when I upgraded towards this system.

    Does anyone in the community know how I can rectify this problem? Thank you for your time.

    Continue reading...

Compartilhe esta Página