CBSE Class 12 Informatics Practices Question 37 of 101

Python Pandas — II — Question 13

Back to all questions
13
Question

Question 13

To divide total distribution of given data in eight equal parts, ............... function is used.

  1. median()
  2. quartile()
  3. quantile()
  4. all of these
Answer

quantile()

Reason — To divide the total distribution of given data into eight equal parts, we can use the quantile() function with a quantile value of 0.125 (1/8). For example, to divide the data of DataFrame df1 into eight equal parts, the statement would be df.quantile(q = 0.125).