how to add a list to dataframe in python

Solutions on MaxInterview for how to add a list to dataframe in python by the best coders in the world

showing results for - "how to add a list to dataframe in python"
Mariangel
07 Oct 2017
1to_append = [5, 6]
2a_series = pd.Series(to_append, index = df.columns)
3df = df.append(a_series, ignore_index=True)