I am trying to filter contents in a column using np.where function. The column has 4 values but i am trying to extract it as below
Classify |
---|
SEARCH |
Website |
App |
Discover |
If the classify column has search then it should populate Search in the column otherwise it should populate Content.
But the final table is only having search values. Is there anything wrong in the np.where function ?
I am trying below :
df['Classify'] = np.where(df['Classify'] == 'SEARCH','Search','Content')