seaborn: statistical data visualization

  •  provides a high-level interface for drawing attractive and informative statistical graphics
  • based on matplotlib

Introduction[^1]

1
2
3
4
5
6
7
8
# it’s recommended to use a Jupyter/IPython interface in matplotlib mode, or else you’ll have to call matplotlib.pyplot.show when you want to see the plot
import seaborn as sns
sns.set() # default theme, affect how all matplotlib plots look
tips = sns.load_dataset("tips") # gat quick access to an example dataset
# draw a faceted scatter plot, total_bill and tip determined the position of each point on the axes, and the size determined the size of each point. Time split the dataset onto two different axes, somker determined the color and shape of each point.
sns.relplot(x="total_bill", y="tip", col="time",
hue="smoker", style="smoker", size="size",
data=tips);

API Structure[^2]

Example

EDA(Exploratory Data Analysis),探索性数据分析

kaggle搜一搜EDA应该大部分用的都是seaborn,结合sklearn和pandas进行一点预处理。

高赞高分kernels:

Be my guest - Recruit Restaurant EDA

Santander EDA and Prediction

EDA, feature engineering and everything

Steering Wheel of Fortune - Porto Seguro EDA

NYC Taxi EDA - Update: The fast & the curious

[^1]: An introduction to seaborn
[^2]: Seaborn API