So I have initialized an empty pandas DataFrame and I would like to iteratively append lists (or Series) as rows in this DataFrame. What is the best way of doing this?
Here's a simple and dumb solution:
>>> import pandas as pd >>> df = pd.DataFrame() >>> df = df.append({'foo':1, 'bar':2}, ignore_index=True)