describe()
noun
say it: “dih-SKRYB” /dɪˈskraɪb/
A pandas method that gives a quick statistical summary of each number column, such as its average, smallest and largest values.
What does describe() do in pandas?
describe() sums up each number column of a DataFrame in eight rows: count, mean, standard deviation (std),
min, the three quartiles (25%, 50% and 75%) and max. A min or max that can't be right, such as a price of -4, shows
up here first.
import pandas as pd
sales = pd.read_csv("sales.csv")
sales.describe().round(2) # count, mean, std, min, 25%, 50%, 75%, max for units and price
In a sentence
- “She ran describe() to see the typical number of units sold.”
- “describe() showed a smallest price of 0, which nobody charges.”
Level: Journeyman · More Python terms at this level
Updated