- 博客(4)
- 收藏
- 关注
原创 pandas versus excel 学习总结3
行操作 reset_index(drop=True)抛弃旧索引,生成新的 append中ignore_index=True在行追加序列时设置 drop(index=[])删除某几行 student.iloc[]与切片student[]作用相同 iloc:通过行号索引行数据 loc:通过行标签索引数据 students.Name.at[]:行号索引定位到某列的某一行 import pandas ...
2018-11-29 15:53:46 362
原创 pandas versus excel 学习总结2
多表联合 how=‘left’ 不论右边存在与否左边的都保存下来 fillna(0) astype(int) 使用join时要设置索引,根据索引联合 import pandas as pd students = pd.read_excel("Student_Score.xlsx",sheet_name='Students') scores = pd.read_excel("Student_Sc...
2018-11-29 10:32:02 141
原创 pandas versus excel 学习总结1—excel相关操作
最近在网易云听了听pandas versus excel这个课,感觉Timothy老师讲的蛮好的,对所讲解的知识点进行一下总结,已备之后翻阅。 1.创建一个excel文件 主要使用to_excel(‘filename’) import os import pandas as pd DIR = os.path.dirname(__file__) filename = os.path.join(D...
2018-11-28 14:11:20 559
原创 Python selectors实现ftp并发
使用selectors实现了ftp并发,实现多个客户端同时链接,同时上传下载文件,但是不能同时上传下载同一个文件。 只是简单的实现了功能,仅供参考。 目录 服务端 import selectors,socket,struct,json,os BASE_DIR = os.path.dirname(os.path.abspath(__file__)) class SelSocket: def...
2018-11-27 11:07:49 324
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人