Created
November 16, 2020 12:50
-
-
Save uomodellamansarda/5a4034224083427766c0f6752967d89c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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