Skip to content

Instantly share code, notes, and snippets.

@uomodellamansarda
Created November 16, 2020 12:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uomodellamansarda/5a4034224083427766c0f6752967d89c to your computer and use it in GitHub Desktop.
Save uomodellamansarda/5a4034224083427766c0f6752967d89c to your computer and use it in GitHub Desktop.
#diff is a set containing the missing movies
#from the movies' revenues DataFrame
#bambi, robin hood, dumbo ecc...
#the set is converted into a list
missing_list=list(diff)
print(missing_list)
#a pattern is created
#in order to define filter
pattern = '|'.join(missing_list)
#creating the boolean mask
boolean_check=df1.movie_title.str.contains(pattern)
print(df1[boolean_check])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment