1from pandas import DataFrame
2
3People_List = ['Jon','Mark','Maria','Jill','Jack']
4
5df = DataFrame (People_List,columns=['First_Name'])
6print (df)
7
1# import pandas as pd
2import pandas as pd
3
4# list of strings
5lst = ['Geeks', 'For', 'Geeks', 'is',
6 'portal', 'for', 'Geeks']
7
8# Calling DataFrame constructor on list
9df = pd.DataFrame(lst)
10df
1salary = [['Company', 'Job', 'Salary($)'],
2 ['Google', 'Machine Learning Engineer', 121000],
3 ['Google', 'Data Scientist', 109000],
4 ['Google', 'Tech Lead', 129000],
5 ['Facebook', 'Data Scientist', 103000]]
6df = pd.DataFrame(salary[1:], columns=salary[0])
1# import pandas as pd
2
3import pandas as pd
4# list of strings
5lst = ['fav', 'tutor', 'coding', 'skills']
6# Calling DataFrame constructor on list
7df = pd.DataFrame(lst)
8print(df)
9
1# import pandas as pd
2import pandas as pd
3
4# List1
5lst = [['tom', 25], ['krish', 30],
6 ['nick', 26], ['juli', 22]]
7
8df = pd.DataFrame(lst, columns =['Name', 'Age'])
9df
10