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 | Mean, Median and Mode with Python
course content

Contenido del Curso

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.

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:

¿Todo estuvo claro?

Sección 2. Capítulo 2
course content

Contenido del Curso

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.

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:

¿Todo estuvo claro?

Sección 2. Capítulo 2
some-alt