摘要: 1. 以下关系型数据库中的表和数据,要求将其转换为适合于HBase存储的表并插入数据: 学生表(Student)(不包括最后一列) 学号(S_No) 姓名(S_Name) 性别(S_Sex) 年龄(S_Age) 课程(course) 2015001 Zhangsan male 23 2015003 阅读全文
posted @ 2018-05-05 10:35 179朱柏铭 阅读(152) 评论(1) 推荐(0) 编辑
摘要: 1、选一个自己感兴趣的主题。 2、用python 编写爬虫程序,从网络上爬取相关主题的数据。 3、对爬了的数据进行文本分析,生成词云。 4、对文本分析结果进行解释说明。 5、写一篇完整的博客,描述上述实现过程、遇到的问题及解决办法、数据分析思想及结论。 6、最后提交爬取的全部数据、爬虫及数据分析源代 阅读全文
posted @ 2018-04-30 00:43 179朱柏铭 阅读(182) 评论(0) 推荐(0) 编辑
摘要: 1. 将新闻的正文内容保存到文本文件。 2. 将新闻数据结构化为字典的列表: 单条新闻的详情-->字典news 一个列表页所有单条新闻汇总-->列表newsls.append(news) 所有列表页的所有新闻汇总列表newstotal.extend(newsls) 3. 安装pandas,用pand 阅读全文
posted @ 2018-04-12 20:56 179朱柏铭 阅读(86) 评论(0) 推荐(0) 编辑
摘要: def getNewsId(url): newsId = re.findall(r'\_(.*).html', newsUrl)[0][-4:] clickUrl = 'http://oa.gzcc.cn/api.php?op=count&id={}&modelid=80'.format(newsI 阅读全文
posted @ 2018-04-04 14:51 179朱柏铭 阅读(125) 评论(0) 推荐(0) 编辑
摘要: 0.可以新建一个用于练习的html文件,在浏览器中打开。 1.利用requests.get(url)获取网页页面的html文件 import requests newsurl='http://news.gzcc.cn/html/xiaoyuanxinwen/' res = requests.get( 阅读全文
posted @ 2018-03-30 00:48 179朱柏铭 阅读(95) 评论(0) 推荐(0) 编辑
摘要: import jieba f = open('sanguoyanyi.txt', 'r',encoding='utf-8')text = f.read()f.close() jieba.add_word('曹操')jieba.add_word('诸葛亮')jieba.add_word('孔明')pu 阅读全文
posted @ 2018-03-28 15:45 179朱柏铭 阅读(98) 评论(0) 推荐(0) 编辑
摘要: word = '''every night in my dreams i see you, i feel you,that is how i know you go on far across the distance and spaces between us you have come to s 阅读全文
posted @ 2018-03-23 11:24 179朱柏铭 阅读(105) 评论(0) 推荐(0) 编辑
摘要: 字符串练习: http://news.gzcc.cn/html/2017/xiaoyuanxinwen_1027/8443.html 取得校园新闻的编号 https://docs.python.org/3/library/turtle.html 产生python文档的网址 http://news.g 阅读全文
posted @ 2018-03-21 08:26 179朱柏铭 阅读(137) 评论(0) 推荐(0) 编辑
摘要: import turtleimport timeimport os#def draw_square(org_x, org_y, x, y): turtle.setpos(org_x, org_y) # to left and bottom connor turtle.color('red', 're 阅读全文
posted @ 2018-03-20 10:36 179朱柏铭 阅读(1733) 评论(0) 推荐(0) 编辑
摘要: cd命令:切换目录 (1)切换到目录 /usr/local cd /usr/local (2)去到目前的上层目录 cd .. (3)回到自己的主文件夹 cd ~ ls命令:查看文件与目录 (4)查看目录/usr下所有的文件 ls -a /usr mkdir命令:新建新目录 (5)进入/tmp目录,创 阅读全文
posted @ 2018-03-14 14:36 179朱柏铭 阅读(132) 评论(0) 推荐(0) 编辑