Is it possible to append to an empty data frame that doesn't contain any indices or columns?
I have tried to do this, but keep getting an empty dataframe at the end.
e.g.
import pandas as pd
df = pd.DataFrame()
data = ['some kind of data here' --> I have checked the type already, and it is a dataframe]
df.append(data)
The result looks like this:
Empty DataFrame
Columns: []
Index: []
newDF = pd.DataFrame() #creates a new dataframe that's empty newDF = newDF.append(oldDF, ignore_index = True) # ignoring index is optional
print(df.append(data))
, becauseappend()
always returns None in Python