Question #364

How to save a DataFrame in a csv file?

Answer

In Python, to save dataframe into a .csv file, the best option is to use the .to_csv() method:

myDataframe.to_csv('filename.csv')

To prevent the index of each row from being stored in the file, add index=False as a second parameter:

myDataframe.to_csv('filename.csv', index=False)

# ID Query URL Count

Icons proudly provided by Friconix.