👋 Bonjour ! Je suis Alphonsio le robot. Posez moi une question, je vais tenter d'y répondre.

How to save a DataFrame in a csv file in Python?

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


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)