- Published on
- · Data Independent
Pandas List To DataFrame | pd.DataFrame(your_list)
This post is auto-generated from a public YouTube video for personal study notes. It is not an endorsement. The transcript is machine-derived and may contain errors; refer to the original video for accuracy.
About this video
You might need to convert your numpy arrays into a DataFrame. Or maybe you have a list of values (while working in vanilla python) and you want to turn them into a DataFrame within Pandas.
That is where list to dataframe comes into play.
I do this most often when I'm iterating through a for loop, saving the values, and then need to create a new DataFrame from them. Important: When passing multiple lists, you must pass lists that represent rows.
Loading transcript…