July 2019
Beginner to intermediate
740 pages
16h 52m
English
Earlier in this chapter, we discussed using scatter plots to show relationships among variables. Often, we want to see these for each combination of variables in the data, which can be tedious to execute. The pandas.plotting subpackage contains a scatter_matrix() function that makes this much easier.
Let's use scatter_matrix() to view the scatter plots for each combination of columns in our Facebook stock prices data:
>>> from pandas.plotting import scatter_matrix>>> scatter_matrix(fb, figsize=(10, 10))
This results in the following plot matrix, which is often used in machine learning to see which variables could be useful in building a model:
Here, we can also easily see that we have strong positive correlations between ...
Read now
Unlock full access