0

How do I drop the movie assigned with 'unknown' category from dataframe?

    movie id    movie title release date    unknown Action  Adventure   Animation   Childrens   Comedy  Crime   ... Fantasy Film-Noir   Horror  Musical Mystery Romance Sci-Fi  Thriller    War Western
0   1   Toy Story   01-Jan-1995 0   0   0   1   1   1   0   ... 0   0   0   0   0   0   0   0   0   0
1   2   GoldenEye   01-Jan-1995 0   1   1   0   0   0   0   ... 0   0   0   0   0   0   0   1   0   0
2   3   Four Rooms  01-Jan-1995 0   0   0   0   0   0   0   ... 0   0   0   0   0   0   0   1   0   0
3   4   Get Shorty  01-Jan-1995 0   1   0   0   0   1   0   ... 0   0   0   0   0   0   0   0   0   0
4   5   Copycat 01-Jan-1995 0   0   0   0   0   0   1   ... 0   0   0   0   0   0   0   1   0   0
5 rows × 22 columns
``
Mehdi
  • 1
  • 1

1 Answers1

0

You can do this:

df = df[df['unknown']!=1]

Or this:

df = df[~(df['unknown']==1)]
NYC Coder
  • 7,424
  • 2
  • 11
  • 24