随笔分类 -  python数据分析

ARIMA模型识别、计算p、q值
摘要:#-*- coding: utf-8 -*- #确定最佳p、d、q值 import pandas as pd #参数初始化 discfile = '../data/discdata_processed.xls' data = pd.read_excel(discfile, index_col = 'COLLECTTIME') data = data.iloc[: len(data)-5] #... 阅读全文
posted @ 2018-06-01 17:22 裸睡的猪
python拉格朗日插值
摘要:#拉格朗日插值代码 import pandas as pd #导入数据分析库Pandas from scipy.interpolate import lagrange #导入拉格朗日插值函数 inputfile = '../data/catering_sale.xls' #销量数据路径 outputfile = '../tmp/sales.xls' #输出数据路径 data = pd.rea... 阅读全文
posted @ 2018-05-30 15:20 裸睡的猪
python数据相关性分析 (计算相关系数)
摘要:#-*- coding: utf-8 -*- #餐饮销量数据相关性分析 计算相关系数 from __future__ import print_function import pandas as pd catering_sale = '../data/catering_sale_all.xls' #餐饮数据,含有其他属性 data = pd.read_excel(catering_sale,... 阅读全文
posted @ 2018-05-28 15:54 裸睡的猪
python贡献度分析20/80定律
摘要:#-*- coding: utf-8 -*- #菜品盈利数据 帕累托图 from __future__ import print_function import pandas as pd #初始化参数 dish_profit = '../data/catering_dish_profit.xls' #餐饮菜品盈利数据 data = pd.read_excel(dish_profit, inde... 阅读全文
posted @ 2018-05-28 15:32 裸睡的猪
python数据统计量分析
摘要:#-*- coding: utf-8 -*- #餐饮销量数据统计量分析 from __future__ import print_function import pandas as pd catering_sale = '../data/catering_sale.xls' #餐饮数据 data = pd.read_excel(catering_sale, index_col = u'日期')... 阅读全文
posted @ 2018-05-28 15:10 裸睡的猪
python箱型图
摘要:#-*- coding: utf-8 -*- import pandas as pd catering_sale = '../data/catering_sale.xls' #餐饮数据 data = pd.read_excel(catering_sale, index_col = u'日期') #读取数据,指定“日期”列为索引列 import matplotlib.pyplot as plt... 阅读全文
posted @ 2018-05-28 11:22 裸睡的猪