The question is below. I used the code below the question. There has to be another way to code for what the question is asking other than the way I did. Use groupby to group the rating variable by the...


The question is below. I used the code below the question. There has to be another way to code for what the question is asking other than the way I did.


Use groupby to group the rating variable by the player's position. Which position has the lowest mean rating? Remember to chain .sort_values(ascending=True) to sort the resulting data on their values and not alphabetically by position name.


df.groupby('position')['rating'].mean().reset_index().sort_values(by='rating',ascending=True)



Jun 08, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here