摘要: pd.DataFrame存在错位的循环对齐(python) 问题描述: 在用tabula处理从pdf抓取的表格过程中,遇到了识别错位导致存在nan(空值)的情况, 需要对pd.DataFrame做调整。初始结构如下: 函数搭建 结果: by 伍钱居士@UIBE 2018-07-23 阅读全文
posted @ 2018-07-23 23:21 伍钱居士 阅读(678) 评论(0) 推荐(1) 编辑
摘要: from pdfminer.pdfparser import PDFParserfrom pdfminer.pdfdocument import PDFDocumentfrom pdfminer.pdfpage import PDFPagefrom pdfminer.pdfpage import P 阅读全文
posted @ 2018-04-27 16:39 伍钱居士 阅读(5160) 评论(2) 推荐(0) 编辑
摘要: 在安装github外部包的时候遇到了需要visual c++ 14.0的报错,查阅了几天,我找到了合适的解决方法。 结果来自于一个网页,安装visualcppbuildtools_full解决好了,为了方便下载我保存到了百度云盘。链接如下: https://pan.baidu.com/s/1fXfx 阅读全文
posted @ 2018-04-10 15:56 伍钱居士 阅读(352) 评论(0) 推荐(0) 编辑
摘要: 1 import xlrd 2 import xlwt 3 from datetime import datetime 4 #输入的s为str形式,如'2017-12-18' 5 def to_date(s): 6 d=datetime.strptime(s,"%Y-%m-%d") 7 return(d) 8 def to_quarter(riqi): 9 ... 阅读全文
posted @ 2017-12-18 21:45 伍钱居士 阅读(1122) 评论(0) 推荐(0) 编辑
摘要: 一、数据库的概念 数据库,生活化的说法是数据的仓库;数学化的说法是 "数据的集合" ,不过这个集合不是杂乱无章的,而是按一定的结构组织的、能够为多个用户共享、具有尽可能小的冗余度、并且与应用程序彼此独立的数据的集合。 二、数据库的发展 第一个阶段称为 "人工管理阶段"。这个阶段的特点是数据和程序在一 阅读全文
posted @ 2017-10-19 19:20 伍钱居士 阅读(243) 评论(0) 推荐(0) 编辑
摘要: 1. 安装 在命令提示符窗口中输入如下命令安装: > pip install tushare > pip install tushare > pip install tushare > pip install tushare > pip install tushare > pip install t 阅读全文
posted @ 2017-10-18 18:19 伍钱居士 阅读(1935) 评论(0) 推荐(0) 编辑
摘要: http://www.runoob.com/python3/python3-basic-syntax.html 阅读全文
posted @ 2017-10-12 20:43 伍钱居士 阅读(88) 评论(0) 推荐(0) 编辑