AttributeError: 'int' object has no attribute 'lower' in TFIDF and CountVectorizer
问题 I tried to predict different classes of the entry messages and I worked on the Persian language. I used Tfidf and Naive-Bayes to classify my input data. Here is my code: import pandas as pd df=pd.read_excel('dataset.xlsx') col=['label','body'] df=df[col] df.columns=['label','body'] df['class_type'] = df['label'].factorize()[0] class_type_df=df[['label','class_type']].drop_duplicates().sort_values('class_type') class_type_id = dict(class_type_df.values) id_to_class_type = dict(class_type_df[[