0

I have this Dataframe with three columns that i recieve from a excel file and create using pandas, so my program needs to order the points column and return a string with the ordered names.

enter image description here

so i make the ordering in a list appart from the DataFrame so at the end i have a list with the ordered numbers, what i want to do is using this list to match the Dataframe 'name' column to print the name corresponding to that score for example print the name of the person with 0 points first and so on.

Pablo Bora
  • 15
  • 3

1 Answers1

0

You can use the built in function to sort the dataframee.

df.sort_values(by=['Points'])

df - dataframe object, Points - name of the points of the column. Once sorted, the dataframe can be printed as usual.

For other parameters that can be used, take a look at the documentation of the function.

ram
  • 437
  • 2
  • 12