Create a Pandas DataFrame from a List

import pandas as pd

data = [['Nick',5],['David',10],['Joe',7],['Ross',6]]

new = pd.DataFrame(data, columns=['Name','Age'])
  
new
    Name  Age
0   Nick    5
1  David   10
2    Joe    7
3   Ross    6

References:

  • 1Convert a List to Dataframe in Python
Previous
Next