开始使用免费开始使用

Penguin group counts

Looking at the penguins dataset, your colleague gets curious about how many observations of the different species there are. With your knowledge of groupby(), can you help them?

The penguins dataset and the DataFrames package have been loaded for you.

本练习是课程的一部分

Data Manipulation in Julia

查看课程

练习说明

  • Create a penguin_species GroupedDataFrame by grouping penguins by species column.
  • Get the number of rows per penguin_species, naming the resulting column as penguins_observed, and sorting the results in descending order of penguins_observed.

交互式实操练习

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

# Create penguin_species
____ = ____(____)

# Count the observations per group and rename the column, then sort
____(____(penguin_species, ____), ____, ____)
编辑并运行代码