EDAhelper.numeric_plots

Here we will demonstrate how to use numeric_plots to generate a matrix of correlation plots.

Imports

from EDAhelper.numeric_plots import numeric_plots
    Creating a matrix of correlation plots with the numeric features.

    Parameters
    ----------
        df: pandas.dataframe
            A pandas dataframe

    Returns
    -------
        splom: Altair chart object
        The Altair object for the plots

    Example
    -------
    >>> from EDAhelper.numeric_plots import numeric_plots
    >>> splom = numeric_plot(df) 
    

Create a dataframe

We’ll first create a dataframe:

import pandas as pd

df = pd.DataFrame({
    'A': [100, 142, 30, 40, 50],
    'B': [94, 55, 100, 120, 110],
    'C': [94, 68, 20, 17, 18],
    'D': [3.86, 4.05, 5.6, 1.0, 5.7],
    'name': ['Jennifer', 'Rowan', 'Steven', 'Vera', 'Florencia']
})

Generate the matrix of correlation plots

splom = numeric_plots(df)
splom