Question: Help! Python programming example! Movie collection with CSV. Modify the movie collection lecture example (which also uses humanize.py) so that it uses true CSV files
Help! Python programming example!
Movie collection with CSV. Modify the movie collection lecture example (which also uses humanize.py) so that it uses true CSV files rather than the janky file format it uses currently with | separating fields. (You should only have to change two functions, readMovies and saveMovies, and make them use csv.reader/csv.writer instead of manually splitting/joining.) Make sure that your program still works correctly when there are commas in movie titles! Once that's done, open this movie spreadsheet (a collection of about 4400 movies sourced from IMDb) and save it to your computer as CSV (Files Download as Comma-separated values) in the same folder as your copy of movie-collection.py. Adjust your main() so that it uses this file instead and verify that your program works! (Note that the first line of the CSV file will be column headers "Title,Year,Runtime,Rating" so you should either remove that from your file or skip over it in your readMovies function.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
