21/11/2022 7:11 pm
Topic starter
1
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
21/11/2022 7:15 pm
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)