Can someone please explain me how I add a row to an empty data frame?
df1 = pd.DataFrame([], columns = ['abc', 'def'])
df2 = pd.DataFrame([[5, 10]], columns = ['abc', 'def'] )
df1.append(df2)
df1
Just trying to understand the example in the documentation.
df1
is still empty.
CodePudding user response:
you have to updade df1 , like this
df1 = df1.append(df2)