From a7fd4e4219cb8a8ffcdc0c385af94305a0071f87 Mon Sep 17 00:00:00 2001 From: sophiekamuf <36629628+sophiekamuf@users.noreply.github.com> Date: Tue, 18 Dec 2018 02:52:01 +0100 Subject: [PATCH] Add "df.describe()" (#24664) --- guide/english/data-science-tools/pandas/index.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/guide/english/data-science-tools/pandas/index.md b/guide/english/data-science-tools/pandas/index.md index cb327ead20..7acd6a26a6 100644 --- a/guide/english/data-science-tools/pandas/index.md +++ b/guide/english/data-science-tools/pandas/index.md @@ -45,6 +45,12 @@ df.tail() ``` This will show the last 5 rows of the data frame. +To show descriptive statistics, such as the shape and central tendency of the dataset, the `describe` method can be used: +```python +df.describe() +``` +This will show the `count`, `mean`, `std`, `min`, `max` among others for numeric data. + ## Subsetting A data frame can be subset in many ways. One of the simplest is getting a single column. For instance, if the data frame `df` contains a column named `age`, we can extract it as follows: ```python