2017年10月19日
摘要: 1、结构化 单条新闻的详情字典:news 一个列表页所有单条新闻汇总列表:newsls.append(news) 所有列表页的所有新闻汇总列表:newstotal.extend(newsls) 2、转换成pandas的数据结构DataFrame 3、从DataFrame保存到excel 4、从DataFrame保存到sqlite3数据库 import requests from bs... 阅读全文
posted @ 2017-10-19 11:26 55卢思凯 阅读(112) 评论(0) 推荐(0) 编辑
  2017年10月12日
摘要: 1、获取单条新闻的#标题#链接#时间#来源#内容 #点击次数,并包装成一个函数。 2、获取一个新闻列表页的所有新闻的上述详情,并包装成一个函数。 3、获取所有新闻列表页的网址,调用上述函数。 阅读全文
posted @ 2017-10-12 15:29 55卢思凯 阅读(140) 评论(0) 推荐(0) 编辑
  2017年9月28日
摘要: 一、爬取校园新闻import requests from bs4 import BeautifulSoup url = requests.get("http://news.gzcc.cn/html/xiaoyuanxinwen/") url.encoding = "utf-8" soup = BeautifulSoup(url.text,'html.parser') #print(sou... 阅读全文
posted @ 2017-09-28 15:37 55卢思凯 阅读(231) 评论(1) 推荐(0) 编辑
  2017年9月21日
摘要: 成绩表增删改查遍历操作 classmate = list("123321123321") print(classmate) classmate.append('3') print(classmate[-1]) classmate.pop() print(classmate[-1]) classmate[-1] = 2 print(classmate[-1]) print(class... 阅读全文
posted @ 2017-09-21 15:38 55卢思凯 阅读(116) 评论(0) 推荐(0) 编辑
  2017年9月18日
摘要: 1、实例:输出12个星座符号,以反斜线分隔。 2、实例:恺撒密码的编码。 3、输入姓名,格式输出:占4位、居中、不足4字的以空格填充。 4、格式化输出:中华人民共和国国内生产总值(GDP)689,136.89亿元(2015年)(千分位、2位小数,浮点数) 5、实例:打出99乘法表 7、用webbro 阅读全文
posted @ 2017-09-18 17:54 55卢思凯 阅读(99) 评论(0) 推荐(0) 编辑
  2017年9月14日
摘要: 画五角星import turtle for i in range(5): turtle.forward(200) turtle.right(144) 画同心圆 import turtle for i in range(4): turtle.penup() turtle.goto(0,-40*i) turtle.pendown() tur... 阅读全文
posted @ 2017-09-14 11:23 55卢思凯 阅读(197) 评论(0) 推荐(0) 编辑
  2017年9月11日
摘要: import turtle turtle.bgcolor("red") turtle.fillcolor("yellow") turtle.color('yellow') turtle.speed(10) turtle.begin_fill() turtle.up() turtle.goto(-600,220) turtle.down() for i in range (5): ... 阅读全文
posted @ 2017-09-11 17:26 55卢思凯 阅读(244) 评论(0) 推荐(0) 编辑
  2017年9月7日
摘要: 一、输出hello worldprint('hello world’) Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. >>> =... 阅读全文
posted @ 2017-09-07 12:21 55卢思凯 阅读(153) 评论(0) 推荐(0) 编辑
  2017年9月4日
摘要: 大数据的引入,极大地增强人们对于信息的重视,平台通过大数据整理、分析,能够清晰地将某些行为呈现给人们。以下载图形变化为例,分析一下大数据, 以上是PC端与移动端对于“下载”的变化。 上图是用户通过百度搜索“下载”的软件比重,可以清晰看出软件所占的比重,有利于软件公司制定效果更新优化策略等。 阅读全文
posted @ 2017-09-04 21:56 55卢思凯 阅读(127) 评论(0) 推荐(0) 编辑