Calculate Mean and Median Values with PythonCalculate 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