How to Append a Python Dictionary to a Pandas DataFrame


If you want to append a Python dictionary to a Pandas DataFrame, you can do this:

# Create a new DataFrame
output = pd.DataFrame()

# Append the dictionary by ignoring the index
output = output.append(dictionary, ignore_index=True)

# View the new DataFrame
print(output.head())

Notice the reassignment output = output.append(...)