How to get filter based data rows from Genre column coming from another dataframe?
I have a movies dataframe as follows:
| Movie_Name | Genre | Rating |
|---|---|---|
| Halloween | Crime, Horror, Thriller | 6.5 |
| Nope | Horror, Mystery, Sci-Fi | 6.9 |
| The Midnight Club | Drama, Horror, Mystery | 6.7 |
| The Northman | Action, Adventure, Drama | 7.1 |
| Prey | Action, Adventure, Drama | 7.2 |
| Uncharted | Action, Adventure | 6.3 |
| Sherwood | Crime, Drama, Mystery | 7.4 |
And I have a user dataframe as follows:
| User_Id | User_Name | Genre |
|---|---|---|
| 100 | Christine | Horror, Thriller, Drama |
I want to get the following rows as output because the user likes horror, thriller, and drama genres.
| Movie_Name | Genre | Rating |
|---|---|---|
| Halloween | Crime, Horror, Thriller | 6.5 |
| Nope | Horror, Mystery, Sci-Fi | 6.9 |
| The Midnight Club | Drama, Horror, Mystery | 6.7 |
| The Northman | Action, Adventure, Drama | 7.1 |
| Prey | Action, Adventure, Drama | 7.2 |
| Sherwood | Crime, Drama, Mystery | 7.4 |
How can I get the Movie rows where a value in the Genre column matches at least one of the User's Genre preferences?