我想实现一个表格所有列的拼接,下面代码几乎可以完成,只是这个语句new=P['Unnamed: 0']会将首列多合并一次,有人知道怎么样改么?
我试过把该语句换成new[],会报错
new=P['Unnamed: 0']
for col in P.columns:
new=new.append(P[col])
new.to_excel(r'D:\P&L Recovery business\临时\cut word test done.xlsx')
我想实现一个表格所有列的拼接,下面代码几乎可以完成,只是这个语句new=P['Unnamed: 0']会将首列多合并一次,有人知道怎么样改么?
我试过把该语句换成new[],会报错
new=P['Unnamed: 0']
for col in P.columns:
new=new.append(P[col])
new.to_excel(r'D:\P&L Recovery business\临时\cut word test done.xlsx')
读取excel可以选择不读取首列的 好像是header 还是index_col参数需要设置下就行