Python Forum
What tool do I need to look at a CSV file?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What tool do I need to look at a CSV file?
#1
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:
   

What tool do I need to open and view it?
Reply
#2
The .csv file is just a text. Try Notepad.
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply
#3
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.
Reply
#4
Any text editor or spreadsheet application would do
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply
#5
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).
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply
#6
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!
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020