ab-logo

Code School for Kids


Using Python and Pandas to Generate Stock Correlations

Pandas for Python is a powerful library for manipulating data. This tutorial will also introduce the relatively new Pandas Datareader which makes the task of getting stock data from several sites a trivial exercise.

The demonstration includes some basic DataFrame functionality, basic data transformation, using pandas to create a correlation matrix and graphing multi-faceted scatter plot or, scatter matrix, with matplotlib for comparison.

This tutorial uses Python 3.6, but the code will work as is in Python 2.7.xx. If you do not already have a scientific Python installation there are several open source products out there including python(x,y), Canopy and Anaconda. You can get a copy of the notebook used in the video here.

More Python Videos