Skip to main contentSkip to solution

Solution

✅ Correct Option: 2

The default argument of df.quantile() is q=0.5, which is the 50th percentile, or the median. The median is the 2nd quartile, so the default quantile is the 2nd.


Options 1 and 3: the 1st and 3rd quartiles are q=0.25 and q=0.75, and must be passed explicitly.

Option 4: the 4th quartile is the maximum (q=1.0), which is also not the default.

To get several quartiles at once, pass a list: df.quantile([0.25, 0.5, 0.75]).

Keyboard Shortcuts

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