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: []

5 Answers
5

Tags:

Leave a Reply

Your email address will not be published. Required fields are marked *