Skip to content

How to convert a list to dataframe in Python?

from pandas import DataFrame

People_List = ['Jon','Mark','Maria','Jill','Jack']

df = DataFrame (People_List,columns=['First_Name'])
print (df)
See also  How to assign a value to multiple variables in Python?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.