Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Calculating Mean and Median Values with Python
course content

Course Content

Learning Statistics with Python

Calculating Mean and Median Values with PythonCalculating Mean and Median Values with Python

You're already familiar with the mean and median, but now let's calculate them using Python. To do this, we need to import the NumPy library with the np alias:

Calculating the Mean and Median with Python

Let's begin by importing the library:

We will use the .mean() and .median() functions to calculate the mean and median values, respectively. Here's a code example, feel free to modify the columns and observe the results:

Everything was clear?

Section 2. Chapter 2
some-alt