Introduction To Seaborn: Chris Mo
Introduction To Seaborn: Chris Mo
Seaborn
I N T E R M E D I AT E D ATA V I S U A L I Z AT I O N W I T H S E A B O R N
Chris Mo
Instructor
Python Visualization Landscape
The python visualization landscape is complex and can be
overwhelming
import pandas as pd
df = pd.read_csv("wines.csv")
df['alcohol'].plot.hist()
Chris Mo
Instructor
Creating a histogram
Distplot function has multiple optional arguments
sns.distplot(df['alcohol'], hist=False,
rug=True, kde_kws={'shade':True})
Chris Mo
Instructor
Introduction to regplot
The regplot function generates a sca er plot with a
regression line
sns.regplot(x="alcohol", sns.lmplot(x="alcohol",
y="quality", y="quality",
data=df) data=df)
sns.lmplot(x="quality", sns.lmplot(x="quality",
y="alcohol", y="alcohol",
data=df, data=df,
hue="type") col="type")