list = ['Japan', 'France', 'United States']
want to compare list with column name place key 'country' and value '' get only those rows which have countries similar to countries in list
the dataframe look like this:
Id Place
767 {'country_code': 'US','country': 'United States'}
645 {'country_code': 'IRL','country': 'Ireland'}
324 {'country_code': 'JAP','country': 'Japan'}
i have used this:
for i in range(0,len(df['place'])):
df['place'][0]["country"].isin(list)