Member-only story
How to use SUM, COUNT, AVERAGE, MAX and MIN with Pandas and Python in a Jupyter Notebook
Documentation for several common Excel functions — SUM, COUNT, AVERAGE, MAX, and MIN — with Pandas, Python and Jupyter Notebook
8 min readApr 8, 2022
It’s difficult to imagine any sort of data analysis without these basic, core functions of Excel: adding, counting, taking an average, finding the max and min…
In this tutorial, I’ll show you exactly how to use these common Excel functions on your Pandas DataFrame. And because we’ll need a dataset before we can do anything, we’ll also quickly go over the basics of pulling data from a public API.
Let’s get started.
Table of Contents
- Set up notebook
- Import data from public API
- Filtering
- SUM
- COUNT
- SHAPE
- AVERAGE (MEAN)
- MAX & MIN
Step 1: Set up notebook
First, let’s get a new notebook open and import pandas:
import pandas as pd