How can I create a CSV file?



How can I create a CSV file?


There are several ways you can create a CSV file which you can use to store data which can then be utilized by modules such as Pandas.

Text Editor

  • You can use any text editor like Notepad to create a CSV file, by saving the file with the extension .csv.

Microsoft Excel

  • Using Microsoft Excel, you can save a file as a CSV file type. To do so, choose “Save as”, and under the “Save as type” option, choose “CSV (comma delimited)”.

Google Docs

  • If you have a Google account, you can quickly create a CSV file. To do so, open a Google Spreadsheet, then choose:
    “File -> Download as -> Comma-separated values (.csv, current sheet)”

If you know of any other ways to create a CSV file, feel free to share them here!


CSV is a simple file format used to store tabular data, such as a spreadsheet or database. Files in the CSV format can be imported to and exported from programs that store data in tables, such as Microsoft Excel or OpenOffice Calc.