Pandas Create Data Frame Column from List
10,484
Wouldn't that be:
list=['a','b','c']
df= pd.DataFrame({'header': list})
header
0 a
1 b
2 c
Author by
Dance Party
Updated on June 04, 2022Comments
-
Dance Party almost 2 years
Given the following list:
list=['a','b','c']
I'd like to create a data frame where the list is the column of values. I'd like the header to be "header".
Like this:
header a b c
Thanks in advance!
-
Dance Party almost 8 yearsYes; I spaced out on that one for sure.