filmov
tv
How To Calculate Standard Deviation Using Python and Pandas

Показать описание
This tutorial explains how to use the Python Pandas library to calculate the Standard Deviation of a dataset.
We will compare the mean, standard deviation, and coefficient of variation for three datasets using Pandas. We will also compare the difference in calculating the standard deviation with Pandas and NumPy.
We will also use Matplotlib to plot the points in a dataset to see where they are located based on mean and standard deviation values.
---------- CHAPTERS ----------
(00:00:15) Explanation of the concept of standard deviation.
(00:00:45) Create a Pandas dataframe that contains historical data we will analyze (the data is in CSV format).
(00:01:30) Use Jupyter Notebook to create the dataframe from the data (import the pandas library).
(00:03:00) Calculate the mean with Pandas.
(00:03:27) Refactor our code to create a function that returns a Pandas dataframe from a CSV file.
(00:05:20) Refactor our Python code to make it more flexible.
(00:06:50) Improve the program to calculate the standard deviation of the close price for three different stocks.
(00:08:19) Introduce the concept of Coefficient of Variation.
(00:09:38) Calculate the standard deviation using the Python NumPy module.
(00:11:15) Plot our dataset using Matplotlib.
Go through the full tutorial on the CodeFatherTech blog:
Download the full source code of this tutorial and the CSV files here:
We will compare the mean, standard deviation, and coefficient of variation for three datasets using Pandas. We will also compare the difference in calculating the standard deviation with Pandas and NumPy.
We will also use Matplotlib to plot the points in a dataset to see where they are located based on mean and standard deviation values.
---------- CHAPTERS ----------
(00:00:15) Explanation of the concept of standard deviation.
(00:00:45) Create a Pandas dataframe that contains historical data we will analyze (the data is in CSV format).
(00:01:30) Use Jupyter Notebook to create the dataframe from the data (import the pandas library).
(00:03:00) Calculate the mean with Pandas.
(00:03:27) Refactor our code to create a function that returns a Pandas dataframe from a CSV file.
(00:05:20) Refactor our Python code to make it more flexible.
(00:06:50) Improve the program to calculate the standard deviation of the close price for three different stocks.
(00:08:19) Introduce the concept of Coefficient of Variation.
(00:09:38) Calculate the standard deviation using the Python NumPy module.
(00:11:15) Plot our dataset using Matplotlib.
Go through the full tutorial on the CodeFatherTech blog:
Download the full source code of this tutorial and the CSV files here:
Комментарии