I have an excel file loaded into pandas and want to filter out those movie reviews that have the specific word I mention in the code. Perhaps, I have written certain code but it is not giving the complete and correct output.
import pandas as pd
import numpy as np
# reading data file
df = pd.read_excel('./data-for-group-project1(original).xlsx')
# preparing data
# reading data file replacing any NaN value in the data
df = df.replace(np.nan, '', regex=True)
# filtering data
df = df[df['reviewcontent'].str.contains('jamaican')]
# displaying
print(df[['rid', 'user_name', 'rating', 'numberofuseful', 'reviewcontent']])