2017-08-29 83 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

相關問題