'DataFrame' object has no attribute 'review'
时间: 2023-09-14 16:07:39 浏览: 36
This error message suggests that the 'DataFrame' object you are working with does not have a column named 'review'.
There could be several reasons for this error message. Perhaps you misspelled the column name, or it was not included in the original dataset. Alternatively, you may have accidentally deleted or renamed the column.
To resolve this issue, you can first check the column names of your 'DataFrame' object by using the 'columns' attribute. For example, if your 'DataFrame' object is named 'df', you can check the column names by running:
```
print(df.columns)
```
If the 'review' column is not listed, you can try to add it to the 'DataFrame' object. For example, if you have a list of reviews called 'reviews_list', you can create a new column in the 'DataFrame' object like this:
```
df['review'] = reviews_list
```
If you are still having trouble, it may be helpful to review your code and dataset to identify any other issues or errors that could be causing this problem.