I just started Data science and I learned about the df.to_csv() method. However the code is giving an error. Thanks for the help.
import pandas as pd
df = pd.DataFrame({"Samuel":"65%","Daniel":"87%","Emily":"85%","Harris":"93%"})
df.to_csv('tocsvsample.csv')