![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
pandas
Thomas_Lean
这里只记录总结技术经验,有任何错误尽管提出哈
展开
-
成功解决pandas报AttributeError: DataFrame object has no attribute ix错误
在实际操作中有时候需要把采集的数据或者分析完的数据保存为excel中,列名按照执行排序,一开始我采用DataFrame的ix方式去实现是可以达到预期的,不过最近发现好像该方法函数被移除了,运行会抛出以下错误:Traceback (most recent call last): File "check_token.py", line 149, in <module> AdAccountManager(manage_log, path).refresh() File "check_原创 2020-10-26 11:01:26 · 24412 阅读 · 0 评论 -
Pandas之入门小案例
刚好现在做测试的同事需要实现一个小功能,就是事先创建一个只有表头的excel表,后面需要传入一个列表,并判断是否存在表头中,如果存在则在该列下面标注’OK’,不存在则标记’X’!很简单的例子。安装pip install pandas==1.0.0原本表格:处理后表格:读取excel文件data = pd.read_excel(path, sheet_name=False, index=False)由于一开始所有列除了标题均为空,所以需要给各列赋空列表:header = set(dat原创 2020-05-15 17:11:04 · 1151 阅读 · 0 评论