上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 33 下一页
  2018年5月29日
摘要: #-*- coding: utf-8 -*- #主成分分析 降维 import pandas as pd #参数初始化 inputfile = '../data/principal_component.xls' outputfile = '../tmp/dimention.xls' #降维后的数据 data = pd.read_excel(inputfile, header = None) ... 阅读全文
posted @ 2018-05-29 10:51 裸睡的猪 阅读(1970) 评论(0) 推荐(0) 编辑
  2018年5月28日
摘要: #!/usr/bin/env python # -*- coding: utf-8 -*- # @Time : 2018/5/28 16:05 # @Author : zhang chao # @File : test.py import matplotlib.pyplot as plt labels='Frogs','Hogs','Dogs','Logs'#定义标签 sizes=... 阅读全文
posted @ 2018-05-28 16:46 裸睡的猪 阅读(406) 评论(0) 推荐(0) 编辑
摘要: #-*- 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 裸睡的猪 阅读(81746) 评论(0) 推荐(1) 编辑
摘要: #-*- 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 裸睡的猪 阅读(817) 评论(0) 推荐(0) 编辑
摘要: #-*- 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 裸睡的猪 阅读(914) 评论(0) 推荐(0) 编辑
摘要: #-*- 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 裸睡的猪 阅读(2993) 评论(0) 推荐(0) 编辑
  2018年5月26日
摘要: #encoding:utf8 import pandas as pd import numpy as np from pylab import * df=pd.read_csv("./path")#CSV文件读取 df1=pd.read_excel("./path")#excel文件读取 df.to_csv("./path")#CSV文件写入 df1.to_excel("./path")#exc... 阅读全文
posted @ 2018-05-26 21:35 裸睡的猪 阅读(2032) 评论(0) 推荐(0) 编辑
摘要: #encoding:utf8 import pandas as pd import numpy as np import matplotlib.pyplot as plt df = pd.DataFrame(np.random.randn(10,4),index=pd.date_range('2018/12/18', periods=10), columns=list('ABCD')) p... 阅读全文
posted @ 2018-05-26 21:29 裸睡的猪 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 1、通过指定周期和频率,使用date.range()函数就可以创建日期序列。 默认情况下,范围的频率是天。 2、bdate_range()用来表示商业日期范围,不同于date_range(),它不包括星期六和星期天。’ 阅读全文
posted @ 2018-05-26 21:21 裸睡的猪 阅读(454) 评论(0) 推荐(0) 编辑
摘要: datetime.now()用于获取当前的日期和时间 print pd.datetime.now() 阅读全文
posted @ 2018-05-26 21:17 裸睡的猪 阅读(12384) 评论(0) 推荐(1) 编辑
上一页 1 ··· 23 24 25 26 27 28 29 30 31 ··· 33 下一页