Write to .csv file

 try:

import pandas as pd

names=[l for l in input("Enter the names separated by ,").split(",")]

marks=[l for l in input("Enter the marks separated by ,").split(",")]

d={'names':names,'marks':marks}

df=pd.DataFrame(d)

print("data object")

print(df)

df.to_csv("record.csv")

except Exception as e:

print(e)