Skip to main contentSkip to solution

DataFrame.quartile() is used to get quartiles. By default DataFrame.quartile() will display ____ quantile.

Solution

✅ Correct Option: 2

By default, DataFrame.quantile() uses the parameter q=0.5q = 0.5, which is the 50th percentile. This is the second quartile, also called the median.

To get other quartiles, pass them explicitly, for example df.quantile([0.25, 0.5, 0.75]).


Option 4: describe() shows the 25%, 50% and 75% values together, but quantile() on its own returns only one value, 0.5.

Keyboard Shortcuts

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