箱型图分析的python代码

箱型图分析的python代码,第1张

部分代码

import pandas as pd
catering_sale = 'XXX.xls'  # 餐饮数据
data = pd.read_excel(catering_sale, index_col=u'number')  # 读取数据,指定“日期”列为索引列
import matplotlib.pyplot as plt  # 导入图像库
from matplotlib.font_manager import FontProperties
font_set = FontProperties(fname=r"c:\windows\fonts\simsun.ttc", size=15)
plt.rcParams['font.sans-serif'] = ['SimHei']  # 用来正常显示中文标签
plt.rcParams['axes.unicode_minus'] = False  # 用来正常显示负号
fig = plt.figure(figsize=(4.5, 5))  # 建立图像
......

效果展示

完整代码链接:箱型图分析的python代码

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/868328.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-13
下一篇2022-05-13

发表评论

登录后才能评论

评论列表(0条)

    保存