1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] How do I find top Values based on different columns?

Discussão em 'Python' iniciado por Stack, Setembro 11, 2025.

  1. Stack

    Stack Membro Participativo

    i am using a dataset of video game sales and i am trying to make a pie chart of the top 10 publishers based on global_sales

    right now i have:

    data['Publisher'].value_counts().head(10).plot.pie(autopct='%1.1f%%', startangle=90)


    but im pretty sure that its only adding up the ammount of times the publishers show up on the dataset

    Rank Name Platform ... JP_Sales Other_Sales Global_Sales
    0 1 Wii Sports Wii ... 3.77 8.46 82.74
    1 2 Super Mario Bros. NES ... 6.81 0.77 40.24
    2 3 Mario Kart Wii Wii ... 3.79 3.31 35.82
    3 4 Wii Sports Resort Wii ... 3.28 2.96 33.00
    4 5 Pokemon Red/Pokemon Blue GB ... 10.22 1.00 31.37

    [5 rows x 11 columns]

    Continue reading...

Compartilhe esta Página