是否可以附加到不包含任何索引或列的空白數據框?追加到Pandas中的空數據框?
我試圖做到這一點,但持續看到在最後一個空的數據幀。
例如
df = pd.DataFrame()
data = ['some kind of data here' --> I have checked the type already, and it is a dataframe]
df.append(data)
結果看起來是這樣的:
Empty DataFrame
Columns: []
Index: []
回答類似的問題在這裏:http://stackoverflow.com/questions/13784192/creating-an-empty-pandas-dataframe-then-filling-it/41529411#41529411。 (newDF = newDF.append(oldDF,ignore_index = True)#忽略索引是可選的# – geekidharsh