摘要: 1.在settings.py同级目录下新建文件useragent.py Java代码 # -*-coding:utf-8-*- from scrapy import log import logging import random from scrapy.downloadermiddlewares. 阅读全文
posted @ 2017-11-15 02:19 兔子的尾巴_Mini 阅读(274) 评论(0) 推荐(0)
摘要: #Author:Mini#!/usr/bin/env pythonfrom selenium import webdriverimport timeimport refrom lxml import etreebs=webdriver.PhantomJS()time.sleep(3)url="htt 阅读全文
posted @ 2017-10-31 13:32 兔子的尾巴_Mini 阅读(1177) 评论(0) 推荐(0)
摘要: #Author:Mini#!/usr/bin/env pythonimport urllib.requestimport urllib.parsefrom sina.miniweibo import APIClientdef weibo(): APP_KEY="2911889655" APP_SEC 阅读全文
posted @ 2017-10-30 17:14 兔子的尾巴_Mini 阅读(2641) 评论(1) 推荐(0)
摘要: #Author:Mini#!/usr/bin/env pythonimport pandas as pimport numpy as nimport matplotlib.pylab as pyldata=p.read_csv("F:/BaiduYunDownload/hexun1.csv")a=d 阅读全文
posted @ 2017-10-29 17:04 兔子的尾巴_Mini 阅读(269) 评论(0) 推荐(0)
摘要: matplotlib图标正常显示中文 为了在图表中能够显示中文和负号等,需要下面一段设置: import matplotlib.pyplot as plt plt.rcParams['font.sans-serif']=['SimHei'] #用来正常显示中文标签 plt.rcParams['axe 阅读全文
posted @ 2017-10-27 15:18 兔子的尾巴_Mini 阅读(1107) 评论(0) 推荐(0)
摘要: #Author:Mini#!/usr/bin/env pythonimport numpy as nc=n.random.random_integers(1,20,12)#(min.max,count)c1=n.random.normal(2,3.0,12)#(mean,a,count) a越大,越 阅读全文
posted @ 2017-10-27 14:46 兔子的尾巴_Mini 阅读(340) 评论(0) 推荐(0)
摘要: #Author:Mini#!/usr/bin/env pythonimport matplotlib.pylab as pylimport numpy as nx=[1,2,3,4,8]y=[3,4,6,7,8]#a1=pyl.plot(x,y) #plot(x,y,color...)折线图a1=p 阅读全文
posted @ 2017-10-27 14:44 兔子的尾巴_Mini 阅读(519) 评论(0) 推荐(0)
摘要: import pandas as pa=p.read_csv("E:/m/b.csv")a1=a.describe()a2=a.sort_values(by="1")#first line(head line)print(a1,a2)b=p.read_excel("E:/m/a.csv")impor 阅读全文
posted @ 2017-10-26 17:25 兔子的尾巴_Mini 阅读(210) 评论(0) 推荐(0)
摘要: numpy: process the data& array pandas:data analysis and explore matplotlib:show with mat &plot scipy: matrix integration statsmodels: statistic Gensim 阅读全文
posted @ 2017-10-24 16:09 兔子的尾巴_Mini 阅读(236) 评论(0) 推荐(0)
摘要: 1. define object 2. get data 3. data explore 4. pre-process the data(clean Data Integration data transformation data reduction) 5.mining modle 6. modl 阅读全文
posted @ 2017-10-24 11:33 兔子的尾巴_Mini 阅读(112) 评论(0) 推荐(0)