I have dataset of Netflix shows. I want to filter the records based on:
data.loc[(data.type=='Movie') & (data.genre=='Action') & ('taxi' in str(data.description))]
There are no syntax errors in the above command however it`s not working as per my assumptions.
The condition that is causing the problem is:
('taxi' in str(data.description)
>Solution :
Try this:
data.loc[(data.type=='Movie') & (data.genre=='Action') & (data.description.str.contains('taxi')]