Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database And Expert Systems Applications 19th International Conference Dexa 2008 Turin Italy September 2008 Proceedings Lncs 5181

Authors: Sourav S. Bhowmick ,Josef Kung ,Roland Wagner

2008th Edition

3540856536, 978-3540856535

More Books

Students also viewed these Databases questions

Question

x-3+1, x23 Let f(x) = -*+3, * Answered: 1 week ago

Answered: 1 week ago