Python Forum
What tool do I need to look at a CSV file? - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: What tool do I need to look at a CSV file? (/thread-9247.html)



What tool do I need to look at a CSV file? - RedSkeleton007 - Mar-29-2018

The following code successfully created a .csv file:
#!/usr/bin/env python3
#MoviesCSV.py

import csv

movieList = [["Monty Python and the Holy Grail", 1975],
          ["Uncle Bazerko's Violent Adventure", 2011],
          ["The Expendables", 2010],
          ["Duke Nukem: Fate of Humanity", 2019]]

with open("movies.csv", "w", newline="") as file:
    writer = csv.writer(file)
    writer.writerows(movieList)
But I can't open it:
[attachment=389]

What tool do I need to open and view it?


RE: What tool do I need to look at a CSV file? - wavic - Mar-29-2018

The .csv file is just a text. Try Notepad.


RE: What tool do I need to look at a CSV file? - Synapse - Mar-29-2018

CSV files are commonly imported into spreadsheets, such as Excel. However are quite diverse that's why many people favor them for exports. If I am not mistaken you could open it by uploading it to say, Google Sheets. Or, there are other alternatives such as CSV Viewer which appears to be more lightweight but doesn't provide tools for editing. Or just notepad.


RE: What tool do I need to look at a CSV file? - buran - Mar-29-2018

Any text editor or spreadsheet application would do


RE: What tool do I need to look at a CSV file? - DeaD_EyE - Mar-29-2018

Just use Libre Office.
This office suite has everything you need to do Spreadsheets, Documents, Presentations, Database and a Math Formula Editor.
Open the file with Libre Office Calc (Spreadsheet Application).


RE: What tool do I need to look at a CSV file? - wavic - Mar-29-2018

Good proposal. MS Office 2019 could be the last version of this office packet. After that all will be in the cloud thanks to Office 356. Bye-bye privacy!