So I'm trying to make a simple filter that will take in the dataframe and filter out all rows that don't have the target genre. It'll be easier to explain with the code:
import pandas as pd
test = [{
"genre":["RPG","Shooter"]},
{"genre":["RPG"]},
{"genre":["Shooter"]}]
data =pd.DataFrame(test)
fil = data.genre.isin(['RPG'])
I want the filter to return a dataframe with the following elements:
[{"genre":["RPG"]},
{"genre":["RPG", "Shooter"]}]
This is the error I'm getting when I try my code:
SystemError: <built-in method view of numpy.ndarray object at 0x00000180D1DF2760> returned a result with an error set