Pandas DataFrame:Concat和to_excel输出

时间:2013-11-06 13:08:37

标签: python pandas

我试图在将三个DataFrame与pandas连接后编写一个xls文件

qq=rand(3,3)
qqq=pd.DataFrame(qq)
q=pd.concat([qqq,qqq,qqq],axis=1)
q.to_excel('foo.xlsx')#it's the same with xls

我获得的输出是: (在第一行中有列名,在第一列中有行名)

    0   1   2   0   1   2   0   1   2
0   0   1   2   0   1   2   0   1   2
1   0   1   2   0   1   2   0   1   2
2   0   1   2   0   1   2   0   1   2

我做错了什么?

1 个答案:

答案 0 :(得分:3)

这是通过https://github.com/pydata/pandas/issues/5235

在当前主数据中修复的
相关问题