Question: Write a function named summarize _ film that has one parameter which is the path to the film data file. There are constants defined in

Write a function named summarize_film that has one parameter which is the path to the film data file. There are constants defined in the template for each of the file column positions, and at the end of the template is the path to the data file named film_locations_with_id.csv that is in the data folder as you can see in the Explorer panel in VS Code.
Your function should:
Open the file for reading as a CSV file using the csv reader
Process each line and calculate the following:
the number of different neighborhoods (based on the neighborhood ID in the last column) were used for .movies or TV shows.How many unique movies (not including TV shows) are represented in the data. Keep in mind that there will often be multiple rows for a movie or TV show (since it was shot in multiple locations), but these duplicates will all have the same ID in the first column of the data.The name and year of the earliest movie in the data.
Your function should print a summary of the above three bullet point items using the format shown in the example.
Example Output (using the supplied file):
SFData film location data summary:
105 neighborhoods where movies or TV shows were filmed
Information on 274 unique movies
The first movie (A Jitney Elopement) was shot in 1915

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!