How to compute the average of a dataframe column
• 1 minHere is the simplest formula to compute the average of a list of variables.

The pandas library has a simple method to compute the mean of a list.
The .mean() method, here is an example:
import pandas as pd
# We read a sample dataset from the web.
df = pd.read_csv('https://raw.githubusercontent.com/mwaskom/seaborn-data/master/iris.csv')
# We select the sepal length column and apply the mean method
print(df["sepal_length"].mean())
Here you are ! You now know how to compute the average of a dataframe column.