Question: write a python function that will take in a list looking like that: [ [80058654, 'TV Show', 'Transformers: Robots in Disguise', None, 'Will Friedle, Darren

write a python function that will take in a list looking like that:

[ [80058654, 'TV Show', 'Transformers: Robots in Disguise', None, 'Will Friedle, Darren Criss, Constance Zimmer, Khary Payton, Mitchell Whitfield, Stuart Allan, Ted McGinley, Peter Cullen', 'United States', '09-08-2018', 2016, "Kids' TV", 'When a prison ship crash unleashes hundreds of Decepticons on Earth, Bumblebee leads a new Autobot force to protect humankind.'] , [70299204, 'Movie', 'Kidnapping Mr. Heineken', 'Daniel Alfredson', 'Jim Sturgess, Sam Worthington, Ryan Kwanten, Anthony Hopkins, Mark van Eeuwen, Thomas Cocquerel, Jemima West, David Dencik', 'Netherlands, Belgium, United Kingdom, United States', '09-08-2017', 2015, 'Action & Adventure, Dramas, International Movies', 'When beer magnate Alfred "Freddy" Heineken is kidnapped in 1983, his abductors make the largest ransom demand in history.'], ...]

and return a dictionary with each unique country name from the country column mapped to the number of times it appears in the cleaned list. Note that the country column may contain more than one country. If the country column contains more than one country, you should add each country as a key to your dictionary and increment the countrys count accordingly (e.g. if the country column contains United States, China, you should increment the count of United States and China ). Include 'Unknown' as a key and the number of times it appears in the cleaned_list as its value.

as follow:

{ 'United States': 296, 'Netherlands': 6, 'Belgium': 7, 'United Kingdom': 56, 'Unknown': 64, 'France': 28, ..., 'Botswana': 1, 'Uruguay': 1, 'Malaysia': 1, 'Romania': 1 }

no the list provide on top is the cleanlist

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 Databases Questions!