0

Hello guys this is my first question on this forum. I'm new using Python but I have problem on this code:

df[
(df["Type 1"] == "Psychic") &
(df["Attack"] > 100)
  ].groupby(["Name", "Type 1"])["Legendary"]
print(df['Type 1'].sort_values(by = 'Attack' , ascending = False).head(10)

I want to show the sorting of Attack that belong to "Name" and "Type 1"

pinegulf
  • 1,334
  • 13
  • 32
sildaf88
  • 11
  • 3
  • 2
    Could you please share some reproducible data from your `df`? Check this post: https://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples – Quinten Apr 19 '22 at 09:15
  • Question just needs formating to be much more clearer, try to use the "code sample" button. – Abel Apr 19 '22 at 10:13

0 Answers0