Question: 2 . For the data given below, write python code that can aggregate this dataset to show the average Rating and average Price for each

2. For the data given below, write python code that can aggregate this dataset to show the average Rating and average Price for each Author within each Genre. However, include only those authors who have published at least 3 books in that genre. Sort the resulting DataFrame by genre first, and then by the highest average rating within each genre.
[Marks -4For the data given below, write python code that can aggregate this dataset to show the average Rating and average Price for each Author within each Genre. However, include only those authors who have published at least 3 books in that genre. Sort the resulting DataFrame by genre first, and then by the highest average rating within each genre.
\table[[Genre,Author,Rating,Price],[Fiction,Author A,2.4982,11.2572],[Fiction,Author A,4.8029,35.4564],[Fiction,Author A,3.9280,22.5742],[Fiction,Author A,3.3946,30.3428],[Non-Fiction,Author B,1.6241,46.3027]]
[Marks -4]
2 . For the data given below, write python code

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!