describe may give you everything you want otherwise you can perform aggregations using groupby and pass a list of agg functions: http://pandas.pydata.org/pandas-docs/stable/groupby.html#applying-multiple-functions-at-once

In [43]:

df.describe()

Out[43]:

       shopper_num is_martian  number_of_items  count_pineapples
count      14.0000         14        14.000000                14
mean        7.5000          0         3.357143                 0
std         4.1833          0         6.452276                 0
min         1.0000      False         0.000000                 0
25%         4.2500          0         0.000000                 0
50%         7.5000          0         0.000000                 0
75%        10.7500          0         3.500000                 0
max        14.0000      False        22.000000                 0

[8 rows x 4 columns]

Note that some columns cannot be summarised as there is no logical way to summarise them, for instance columns containing string data

As you prefer you can transpose the result if you prefer:

In [47]:

df.describe().transpose()

Out[47]:

                 count      mean       std    min   25%  50%    75%    max
shopper_num         14       7.5    4.1833      1  4.25  7.5  10.75     14
is_martian          14         0         0  False     0    0      0  False
number_of_items     14  3.357143  6.452276      0     0    0    3.5     22
count_pineapples    14         0         0      0     0    0      0      0

[4 rows x 8 columns]
Answer from EdChum on Stack Overflow
🌐
Pandas
pandas.pydata.org › docs › getting_started › intro_tutorials › 06_calculate_statistics.html
How to calculate summary statistics — pandas 3.0.2 documentation
Calculating a given statistic (e.g. mean age) for each category in a column (e.g. male/female in the Sex column) is a common pattern. The groupby method is used to support this type of operations. This fits in the more general split-apply-combine pattern: ... The apply and combine steps are typically done together in pandas...
🌐
Pandas
pandas.pydata.org › docs › reference › api › pandas.DataFrame.describe.html
pandas.DataFrame.describe — pandas 3.0.1 documentation
Descriptive statistics include those that summarize the central tendency, dispersion and shape of a dataset’s distribution, excluding NaN values.
🌐
GeeksforGeeks
geeksforgeeks.org › pandas › how-to-calculate-summary-statistics-in-pandas
How To Calculate Summary Statistics In Pandas - GeeksforGeeks
July 23, 2025 - Explanation: In this, we create ... We then used the describe() function on the DataFrame which provides a summary of key statistics including count, mean, standard deviation and percentiles....
🌐
Data Science Discovery
discovery.cs.illinois.edu › guides › DataFrame-Fundamentals › descriptive-statistics-of-columns-in-dataframes
Finding Descriptive Statistics for Columns in a DataFrame - Data Science Discovery
A great way to familiarize ourselves with all the new information is to look at descriptive statistics (sometimes known as summary statistics) for all applicable variables. To demonstrate these functions, we'll use a DataFrame of five different movies, including information about their release date, how much money they made in US dollars, and a personal rating out of 10. import pandas as pd\n \n#Creates a DataFrame of "movie", "release date", "domestic gross", "worldwide gross", "personal rating", and "international box office" columns\ndf = pd.DataFrame([\n {"movie": "The Truman Show", "
🌐
Pandas
pandas.pydata.org › pandas-docs › version › 1.2.2 › getting_started › intro_tutorials › 06_calculate_statistics.html
How to calculate summary statistics? — pandas 1.2.2 documentation
Calculating a given statistic (e.g. mean age) for each category in a column (e.g. male/female in the Sex column) is a common pattern. The groupby method is used to support this type of operations. More general, this fits in the more general split-apply-combine pattern: ... The apply and combine steps are typically done together in pandas...
🌐
Earth Data Science
earthdatascience.org › home
Run Calculations and Summary Statistics on Pandas Dataframes | Earth Data Science - Earth Lab
September 15, 2020 - Pandas dataframes also provide methods to summarize numeric values contained within the dataframe. For example, you can use the method .describe() to run summary statistics on all of the numeric columns in a pandas dataframe:
🌐
Spark By {Examples}
sparkbyexamples.com › home › pandas › calculate summary statistics in pandas
Calculate Summary Statistics in Pandas - Spark By {Examples}
March 27, 2024 - Based on the object you use it either returns DataFrame or Series. The Pandas describe() function calculates the Descriptive summary statistics of values by excluding NaN values from the DataFrame & Series.
Find elsewhere
🌐
Data Science Dojo
discuss.datasciencedojo.com › python
How to get summary statistics of a Pandas Dataframe in Python? - Python - Data Science Dojo Discussions
March 24, 2023 - In Pandas, is there a method to get summary statistics for all dataframe columns at once, or should I do it individually for each column? Having an overall data insight through collective statistics before detailed analysis is often beneficial. You can use the following sample dataframe that ...
🌐
Pandas
pandas.pydata.org › pandas-docs › stable › getting_started › intro_tutorials › 06_calculate_statistics.html
How to calculate summary statistics — pandas 2.3.3 documentation
Calculating a given statistic (e.g. mean age) for each category in a column (e.g. male/female in the Sex column) is a common pattern. The groupby method is used to support this type of operations. This fits in the more general split-apply-combine pattern: ... The apply and combine steps are typically done together in pandas...
🌐
Note.nkmk.me
note.nkmk.me › home › python › pandas
pandas: Get summary statistics for each column with describe() | note.nkmk.me
January 20, 2024 - In pandas, the describe() method on DataFrame and Series allows you to get summary statistics such as the mean, standard deviation, maximum, minimum, and mode for each column. pandas.DataFrame.describ ...
🌐
DataCamp
campus.datacamp.com › courses › data-manipulation-with-pandas › aggregating-dataframes
Summary statistics | Python
We can also use agg to get multiple summary statistics at once. Here's another function that computes the fortieth percentile called pct40. We can pass a list of functions into agg, in this case, pct30 and pct40, which will return the thirtieth and fortieth percentiles of the dogs' weights. pandas ...
🌐
TutorialsPoint
tutorialspoint.com › home › python_pandas › pandas descriptive statistics
Python Pandas - Descriptive Statistics
February 21, 2009 - In this tutorial we will discuss about the some of the most commonly used descriptive statistics functions in Pandas, applied to both Series and DataFrame objects. These methods can be classified into different categories based on their functionality, such as Aggregation Functions, Cumulative Functions, and more. Aggregation functions produce a single value from a series of data, providing a concise summary of your dataset.
🌐
GitHub
github.com › gdsaxton › PANDAS › blob › master › Chapter 6 - Producing a Summary Statistics Table for Publication.ipynb
PANDAS/Chapter 6 - Producing a Summary Statistics Table for Publication.ipynb at master · gdsaxton/PANDAS
Below is an example of a summary statistics table from an article <a href=\"https://twitter.com/chaoguo1\" target=\"_blank\">Chao Guo</a> and I published last year on 150 nonprofit advocacy organizations' use of Twitter:\n",
Author   gdsaxton
🌐
Towards Data Science
towardsdatascience.com › home › latest › mastering summary statistics with pandas
Mastering Summary Statistics with Pandas | Towards Data Science
January 17, 2025 - To summarize, in this post we discussed how to generate summary statistics using the Pandas library. First we discussed how to use pandas methods to generate mean, median, max, min and standard deviation. We also implemented a function that generates these statistics given a numerical column name.
🌐
Pandas
pandas.pydata.org › pandas-docs › stable › reference › api › pandas.DataFrame.describe.html
pandas.DataFrame.describe — pandas 3.0.2 documentation
Descriptive statistics include those that summarize the central tendency, dispersion and shape of a dataset’s distribution, excluding NaN values.
🌐
Statology
statology.org › home › how to calculate summary statistics for a pandas dataframe
How to Calculate Summary Statistics for a Pandas DataFrame
March 3, 2022 - Note that we can use similar syntax to calculate a different summary statistic, such as the median: df.groupby('team').median() points assists rebounds team A 18.5 7.0 9.0 B 20.0 9.0 6.0 · The output displays the median value for the points, assists, and rebounds variables, grouped by the team variable. Note: You can find the complete documentation for the describe function in pandas here.
🌐
Zero To Mastery
zerotomastery.io › blog › summary-statistics-in-python
An Introduction To Summary Statistics In Python (With Code Examples) | Zero To Mastery
May 24, 2024 - To help explain Python and its features for summary statistics, let’s create a classic marketing dataset so that we can add some context. ... Here’s a peek at what your data might look like as Python code. ... import pandas as pd import numpy as np # Creating a DataFrame with various types of data data = { 'Date': pd.date_range(start='2024-01-01', periods=7), 'Temperature': [78, 85, 74, 84, 79, 73, 77], 'Sales': [234, 190, 302, 280, 310, 215, 275], 'CustomerSatisfaction': [4.5, 3.8, 4.2, 4.0, 5.0, 3.5, 4.1] } df = pd.DataFrame(data) df.head()
🌐
Apache
spark.apache.org › docs › latest › api › python › reference › pyspark.sql › api › pyspark.sql.DataFrame.summary.html
pyspark.sql.DataFrame.summary — PySpark 4.1.1 documentation
Computes basic statistics for numeric and string columns. ... This function is meant for exploratory data analysis, as we make no guarantee about the backward compatibility of the schema of the resulting DataFrame. ... >>> df = spark.createDataFrame( ... [("Bob", 13, 40.3, 150.5), ("Alice", ...