Search⌘ K

Challenge 4: Plays-to-Fans Ratio (Medium)

Explore how to group DataFrames by country and compute the plays-to-fans ratio using aggregation and apply functions in Pandas. This lesson helps you apply grouping techniques to real-world data and convert results into a Python dictionary, enhancing your data analysis skills for interview readiness.

Problem definition

Your music analyst would like to know the ratio of plays/fans (plays per fan) to see how dedicated listeners are to artists. This comes with a twist: it should be done per nation, not per ...