If you have a large DataFrame called df and you want to view the summary…

2026

If you have a large DataFrame called df and you want to view the summary statistics (mean, count, standard deviation, etc.) for all numerical columns, which method should you use?

Answer: B. df.describe()Use the describe() method on your DataFrame (e.g., df.describe()). This function automatically calculates summary statistics like count, mean, std, min, and…

  1. A.

    df.info()

  2. B.

    df.describe()

  3. C.

    df.head()

  4. D.

    df.summary()

Attempted by 207 students.

Show answer & explanation

Correct answer: B

Use the describe() method on your DataFrame (e.g., df.describe()). This function automatically calculates summary statistics like count, mean, std, min, and max for all numerical columns.

Explore the full course: Hpsc Pgt Computer Science

Loading lesson…