2017-08-29 112 views
0

我试图通过大熊猫库的数据框的列追加到一列:如何将所有列添加到Pandas中的一列中?

DF是表:enter image description here

oneCol = [] 
colLength = len(finalDF) 
for k in range(colLength): 
    oneCol.append(DF[k]) 
combined = pd.DataFrame(oneCol) 
combined 

但输出enter image description here

我是什么之后只是一列数据帧。 谢谢。

回答

1
combined = pd.concat(oneCol, ignore_index=True) 
+0

这很好。谢谢。 – Matt

相关问题