Create DF from 2 lists

 avatar
user_6939821
python
a year ago
291 B
1
Indexable
Never
## Create DF from 2 lists (using zip() )  


import pandas as pd
  
# list of strings
lst = ['Geeks', 'For', 'Geeks', 'is', 'portal', 'for', 'Geeks']
  
# list of int
lst2 = [11, 22, 33, 44, 55, 66, 77]
  
df = pd.DataFrame(list(zip(lst, lst2)),
               columns =['Name', 'val'])
df