摘要: 即可! 添加新的列: data['m'] = data['code'].str[:4] 阅读全文
posted @ 2020-05-27 08:31 半日闲1 阅读(5269) 评论(0) 推荐(0) 编辑
摘要: 会生成多个csv文件 1. 打开cmd,切换到存放csv的文件夹 2. 输入copy *.csv all.csv all.csv任意起的名字,回车即可 阅读全文
posted @ 2020-05-27 08:06 半日闲1 阅读(1249) 评论(0) 推荐(0) 编辑
摘要: 将 'a10' 列 改为 ’a11‘ 列 即可! 阅读全文
posted @ 2020-05-27 07:59 半日闲1 阅读(1609) 评论(0) 推荐(0) 编辑
摘要: 示例: 阅读全文
posted @ 2020-05-26 08:43 半日闲1 阅读(2141) 评论(0) 推荐(0) 编辑
摘要: data[['m']] = data[['m']].astype(int) 若 m 列有空值或者 '' 等都无法转换 可先去除,再转换即可! df3[['列名']] = df3[['列名']].astype(object) 阅读全文
posted @ 2020-05-26 08:40 半日闲1 阅读(5085) 评论(0) 推荐(0) 编辑
摘要: 示例: 过滤某列含有 '层' 的行 #删除/选取某列含有特定数值的行 df1=df1[df1['A'].isin([1])] df1[df1['A'].isin([1])] # 选取df1中A列包含数字1的行 df1=df1[~df1['A'].isin([1])] # 通过~取反,选取不包含数字1 阅读全文
posted @ 2020-05-26 08:37 半日闲1 阅读(751) 评论(0) 推荐(0) 编辑
摘要: 知识点:str.extract()函数 df5['n'] = df5['n'].str.extract('(\d+)', expand=False) 阅读全文
posted @ 2020-05-26 08:25 半日闲1 阅读(4307) 评论(0) 推荐(0) 编辑
摘要: 1. del df['columns'] #改变原始数据 2. df.drop('columns', axis=1) #删除不改表原始数据,可以通过重新赋值的方式赋值该数据 3. df.drop('columns', axis=1,inplace='True') #改变原始数据 columns为列名 阅读全文
posted @ 2020-05-26 08:13 半日闲1 阅读(414) 评论(0) 推荐(0) 编辑
摘要: 查看行列数:df.shape 返回一个元组 查看行数:df.shape[0] 查看列数:df.shape[1] 即可! 阅读全文
posted @ 2020-05-26 08:00 半日闲1 阅读(2683) 评论(0) 推荐(0) 编辑
摘要: 示例: git init xxx //初始化仓库(工作区) git add a.txt xy.sh //上传两个文件至暂存区 git commit -m "first" //上传至分支 git clone https://github.com/feiYufy123/tt //克隆网址 git rem 阅读全文
posted @ 2020-05-24 11:54 半日闲1 阅读(220) 评论(0) 推荐(0) 编辑