- 博客(3)
- 收藏
- 关注
原创 (Python)[多个excel表处理]根据excel表 一字段内容 批量分类 至对应文件夹
(Python)[多个excel表处理]根据excel表一字段内容批量分类至对应文件夹使用库shutilospandas代码块path = '#' # 多个excel表所在的文件夹路径files = os.listdir(path)new_list = ['#'] # 分类的对应字段列表not_path = '#' # 无法分类的文件ad_list = ['#'] # 分类的对应文件夹名列表for i in files: df = pd.read_excel(pa
2021-10-09 18:17:12
541
原创 (Python)批量创建文件夹
(Python)批量创建文件夹使用库os代码块targetpath # 创建文件夹的路径part_name =[] # 文件名列表 for i in part_name: a = os.makedirs(targetpath+'\\{}'.format(i)) b = targetpath+'\\{}\\'.formbat(i) # 创建后文件夹的所在路径 print(b)...
2021-10-09 17:32:09
587
原创 (Python)pandas库批量读取excel文件转换为列表
(Python)pandas库批量读取excel文件转换为列表使用库ospandas代码块path = input('输入目标文件夹: \n')files = os.listdir(path)for i in files: df = pd.read_excel(path + '\\{}'.format(i), engine='openpyxl') a = df.valueas.tolist() print(a)...
2021-10-09 17:14:34
1781
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人