[Solved] Write a Python code to create a dataframe with appropriate headings from the list given below :

   RSS

1
Topic starter

Write a Python code to create a dataframe with appropriate headings from the list given below :

[ ‘S101’,’Amy’,70],[‘S102’,’Bandhi’,69],[‘S104’,’Cathy’,75],[‘S105’,’Gundaho’,82]
This topic was modified 1 year ago by CodeWithBishal-admin
1 Answer
1
Topic starter
import pandas as pd

list = [ ‘S101’,’Amy’,70],[‘S102’,’Bandhi’,69],[‘S104’,’Cathy’,75],[‘S105’,’Gundaho’,82]
 
dF = pd.DataFrame(list, columns=['ID', 'Name', 'Marks'])

print(dF)