[Solved] WAP to create student.csv file from the following data

   RSS

1
Topic starter

WAP to create student.csv file from the following data:

 

 

This topic was modified 1 year ago by CodeWithBishal-admin
1 Answer
1
Topic starter
import pandas as pd


data = {
"Roll No": [1,2,3,4,5,6],
"StudName":["Teena", "Rinku", "Payel", "Akshay", "Arbin", "Robin"],
"Marks":[90,78,88,89,77,97],
"Class":["11A", "11B", "11C", "11A", "11D", "11E"]
}


df = pd.DataFrame(data)


df.to_csv("student.csv")