07 2017 档案
摘要:# * _*_ coding:utf-8 _*___author__:'denny 20170730'from functools import reduceimport functoolsimport pandas as pd #create dataframe#df method#partial
阅读全文
摘要:python. pandas(series,dataframe,index,reindex,csv file read and write) method test import pandas as pdimport numpy as np def testpandas(): p = pd.Seri
阅读全文
摘要:#read and write csv of pandasimport pandas as pdgoog =pd.read_csv(r'C:\python\demo\LiaoXueFeng\data\test_vrt.csv',index_col=0)goog=goog.reindex(pd.to_
阅读全文
摘要:Python 入门网络爬虫之精华版 转载 宁哥的小站,总结的不错 Python学习网络爬虫主要分3个大的版块:抓取,分析,存储 另外,比较常用的爬虫框架Scrapy,这里最后也详细介绍一下。 首先列举一下本人总结的相关文章,这些覆盖了入门网络爬虫需要的基本概念和技巧:宁哥的小站-网络爬虫 当我们在浏
阅读全文
摘要:Requests 是用Python语言编写,基于 urllib,采用 Apache2 Licensed 开源协议的 HTTP 库。它比 urllib 更加方便,可以节约我们大量的工作,完全满足 HTTP 测试需求。Requests 的哲学是以 PEP 20 的习语为中心开发的,所以它比 urllib
阅读全文
摘要:检测访问者的浏览器和版本号有关访问者的浏览器的更多信息有关访问者的浏览器的全部细节根据浏览器来提醒用户 <html><body><script type="text/javascript">document.write("<p>浏览器:")document.write(navigator.appNa
阅读全文
摘要:6.函数: match.sqrt(),lower(),len(),type(),isinstance('a',str),max(),min(),dir(),hex(),setattar(obj,'y',19),getattar(obj,'y') map(),reduce(),filter(),lis
阅读全文
摘要:1.python简介特点: 是简单义学,有功能强大,高性能。面向对象,对动态输入的支持。解释性语言的本质,是大多数平台上理想的脚本语言。 简单,义学 免费,开源 高级语言,不用管理内存等底层细节 可移植性:Linux,windows,freebsd,windowsce,mac 解释性:python解
阅读全文
摘要:1.切片:截取List,tuple指定范围内的值:>>L[0,3] 2.如果给定一个list或tuple,我们可以通过for循环来遍历这个list或tuple,这种遍历我们称为迭代(Iteration)。 在Python中,迭代是通过for ... in来完成的 for x in L print(x
阅读全文