I have the dataframe which has two colums(Reviews and Label):
Reviews Label
0 [cameron, diaz, woman, marri, judg, play] 1
1 [turgid, dialogu, feebl, character, harvey] 0
2 [misfortun, watch, rubbish, sky, cinema] 1
I want to apply the TfidfVectorizer on the DF.
I have written the following code.
from sklearn.feature_extraction.text import TfidfVectorizer
df_x=train_df["Reviews"]
df_y=train_df["Label"]
cv = TfidfVectorizer()
df_xcv = cv.fit_transform(df_x)
a=df_xcv.toarray()
cv.get_feature_names()
which is giving an error:
AttributeError: 'list' object has no attribute 'lower'
Why is this throwing an error?