标签:nic swa 分析 des pre pyplot pandas cal rip
import seaborn as sns
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
sns.set(style = "whitegrid",color_codes = True)
np.random.seed(sum(map(ord,"categorical")))
titanic = pd.read_csv("titanic.csv")
tips = pd.read_csv("tips.csv")
iris = pd.read_csv("iris.csv")
# 显示多个点
# sns.stripplot(x = "day",y = "total_bill",data = tips)
# plt.show()
# sns.swarmplot(x = "day",y = "total_bill",data = tips,hue = "sex")
# # hue="sex" 生成两个颜色的小圆圈 混合进行查看,进行优化
# plt.show()
# # 四分位距 IQR 四分之一到四分之三位 之间的距离
# # N = 1.5 * IQR
# # 离群点 > Q3 + N , < Q1 - N
# sns.boxplot(x = "day",y = "total_bill",data = tips)
# # hue = "time" 列名
# plt.show()
# 小提琴图
# sns.violinplot(x = "total_bill",y = "day",hue = "time",data = tips)
# plt.show()
# # 加入 split 竖着展示
# sns.violinplot(x = "day",y = "total_bill",hue = "sex",data = tips,split = True)
# plt.show()
2020-04-24
标签:nic swa 分析 des pre pyplot pandas cal rip
原文地址:https://www.cnblogs.com/hany-postq473111315/p/12766576.html