Context. A reviews site wants the average rating for each movie genre.
Your task. Write avg_rating_per_genre(df) that returns a Series indexed by genre, with the mean of the rating column for that genre.
Example. Genre Action has ratings [4, 5] → entry Action: 4.5.
Notes. Genre order in the result doesn't matter. A genre with one rating returns that rating as its mean. Empty DataFrame → empty Series.