python
peterchan88
这个作者很懒,什么都没留下…
展开
-
python爬虫框架(scrapy)
scrapy学习1.scrapy的安装 参考scrapy官网:https://scrapy.org/ linux用户可以直接命令下载:sudo pip install scrapy ps:安装的时候可能会报错,可以手动的将需要的模块从Python的官网中下载安装即可。2.scrapy的学习 1.scrapy中文文档:http://sc原创 2016-10-24 11:31:05 · 317 阅读 · 0 评论 -
在dataframe两列日期相减并且得到具体的月数
df = pd.DataFrame(np.random.randn(6,4), index=pd.date_range('20130101', periods=6), columns=list('ABCD'))df.A = pd.date_range('20160101', periods=6)print (df)df1 = pd.DataFrame(np.random.randn(6原创 2017-07-14 20:11:34 · 12479 阅读 · 1 评论 -
numpy教程:统计函数Statistics
lz总结的一般统计函数np.unique()返冋其参数数组中所有不同的值,并且按照从小到大的顺序排列。它有两个可选参数:return_index : Ture表示同时返回原始数组中的下标。Return_inverse: True表示返冋重建原始数组用的下标数组。a = np.array([1, 1, 9, 5, 2, 6, 7, 6, 2, 9])>>> np.转载 2017-07-15 11:07:02 · 944 阅读 · 0 评论