开始使用免费开始使用

Custom summaries with describe

To wrap up your analysis of the Spotify dataset, leadership needs a summary that matches their reporting thresholds. Generate statistics for popularity and monthly_listeners with custom percentiles at 10%, 50%, and 90% to capture the full distribution.

polars is loaded as pl. The DataFrame spotify is preloaded for you.

本练习是课程的一部分

Data Transformation with Polars

查看课程

练习说明

  • Select the popularity and monthly_listeners columns.
  • Generate a summary with percentiles at 0.10, 0.50, and 0.90.

交互式实操练习

通过完成这段示例代码来试试这个练习。

# Create a summary with custom percentiles
result = spotify.select("____", "____").____(
    percentiles=[____, 0.50, 0.90]
)

print(result)
编辑并运行代码