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

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
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)