Skip to main contentSkip to solution

Which of the following are steps corresponding to the GROUP BY function strategy?

A. apply

B. split

C. combine

D. dataframe

Solution

✅ Correct Option: 2

The GROUP BY strategy in pandas follows the split-apply-combine pattern. The data is split into groups based on a key, a function is applied to each group independently, and the results are combined into a single output.

So the steps are split (B), apply (A) and combine (C).


Option D (dataframe): this is the data structure that GROUP BY works on, not a step of the strategy.

Keyboard Shortcuts

  • Left arrow: Previous question
  • Right arrow: Next question
  • S key: Jump to solution
  • Q key: Jump to question