import pandas as pd df = pd.read_excel('1666.xlsx',sheet_name=0) df.head() #原顺序xh,xm,id且各列都有数据 dfNewCol = df.reindex(columns=['id','xh','xm']).head() test = dfNewCol test.to_excel('3666.xlsx', sheet_name='sheet', header=True, index=True)
python调整execl列顺序
最新推荐文章于 2024-04-24 08:04:08 发布