Find relationship in dataset

Statistical Data Visualization - seaborn

Thu, 19 Jul 2018

To find the relationship between two columns in dataset, seaborn can find it by using a scatter plot matrix.

# Create a scatter plot matrix
%matplotlib inline
import seaborn as sns
num_cols = ["Age", "Height", "Weight", "Duration",
 "Heart_Rate", "Body_Temp", "Calories"]
sns.pairplot(frame[num_cols], size=2)


To show details in two specific data, e.g. Duration and Calories

# Plot duration vs calories by gender
sns.lmplot(x = 'Duration', y = 'Calories', data = frame,
 hue = "Gender", palette = "Set2", fit_reg = False) 


Samson Lam

Samson Lam Microsoft Student Partner | Programmer | Change Agent | Fintech Innovation Partner