python by searching the country only, answer the following questions: 1. how many movie titles mention the united states? 2. how many movie descriptions mention the united states? 3. how many movies are from the united states?

Respuesta :

python by searching the country only

Program:

1. Import pandas as pd

df = pd.read_csv('movies_metadata.csv')

#Set the index to the movie title

df = df.set_index('movie_title')

#Details of the movie ' title with United states

result = df.loc['united states']

result.count()

print(result.count())

2. import pandas as pd

df = pd.read_csv('movies_metadata.csv')

#Set the index to the movie description

df = df.set_index('movie_description)

#Details of the movie ' description with United states'

results = df.loc['united states']

results.count()

print(results.count())

3.import pandas as pd

df = pd.read_csv('movies_metadata.csv')

#Set the index to the title

df = df.set_index('country')

#Details of the movie 'Grumpier Old Men'

numberofmovies = df.loc['unitedstates']

movies_count = numberofmovies.count()

print(movies_count)

Hence using pandas and data frame concept we can solve the question

To know more on pandas follow this link

https://brainly.com/question/24942162

#SPJ4