pandas合并文件

import pandas as pd
pd.set_option('expand_frame_repr',False)
import glob

pd.concat((pd.read_csv(file,names=['name','prices','price'],engine='python',encoding='utf-8') for file in glob.glob('C:/Users/badminton.Zhou/Desktop/国家/*.csv'))).to_excel('C:/Users/badminton.Zhou/Desktop/国家/ho.xlsx')

猜你喜欢

转载自blog.csdn.net/king_26852/article/details/86503184
今日推荐