import pandas as pd

Create a Pandas DataFrame from Lists

Row Oriented List

row_list = [
    ('Marissa', 21, 18,16),
    ('Osman', 3, 2, 4),
    ('Bill', 17, 14, 15),    
]
column_names = ['user_name','jan','feb','mar']
row_list
[('Marissa', 21, 18, 16), ('Osman', 3, 2, 4), ('Bill', 17, 14, 15)]
pd.DataFrame(row_list, columns=column_names) #pd.DataFrame.from_records(row_list, columns=column_names)
user_name jan feb mar
0 Marissa 21 18 16
1 Osman 3 2 4
2 Bill 17 14 15

Column Oriented List

column_list = [
    ('user_name', ['Marissa','Osman','Bill']),
    ('jan', [21,3,17]),
    ('feb', [18,2,14]),
    ('mar', [16,4,15])
]
column_list
[('user_name', ['Marissa', 'Osman', 'Bill']),
 ('jan', [21, 3, 17]),
 ('feb', [18, 2, 14]),
 ('mar', [16, 4, 15])]
dict(column_list)
{'user_name': ['Marissa', 'Osman', 'Bill'],
 'jan': [21, 3, 17],
 'feb': [18, 2, 14],
 'mar': [16, 4, 15]}
pd.DataFrame(dict(column_list))
user_name jan feb mar
0 Marissa 21 18 16
1 Osman 3 2 4
2 Bill 17 14 15

Create a Pandas DataFrame from Dictionaries

Column Oriented Dictionary

column_dict = {
    'user_name':['Marissa','Osman','Bill'],
    'jan': [21,3,17],
    'feb': [18,2,14],
    'mar': [16,4,15]
}
column_dict
{'user_name': ['Marissa', 'Osman', 'Bill'],
 'jan': [21, 3, 17],
 'feb': [18, 2, 14],
 'mar': [16, 4, 15]}
pd.DataFrame(column_dict)
user_name jan feb mar
0 Marissa 21 18 16
1 Osman 3 2 4
2 Bill 17 14 15

Row Oriented Dictionary

row_dict = [
    {'user_name': 'Marissa', 'jan': 21, 'feb':18, 'mar':16},
    {'user_name': 'Osman', 'jan': 3, 'feb':2, 'mar':4},
    {'user_name': 'Bill', 'jan': 16, 'feb':14, 'mar':15}
]
row_dict
[{'user_name': 'Marissa', 'jan': 21, 'feb': 18, 'mar': 16},
 {'user_name': 'Osman', 'jan': 3, 'feb': 2, 'mar': 4},
 {'user_name': 'Bill', 'jan': 16, 'feb': 14, 'mar': 15}]
pd.DataFrame(row_dict)
user_name jan feb mar
0 Marissa 21 18 16
1 Osman 3 2 4
2 Bill 16 14 15