I have a question because there is a partial error in bow_vect = vector.fit_transform.

Asked 1 years ago, Updated 1 years ago, 390 views

bow_vect = vect.fit_transform(df1['review'].tolist())

이 부분에서 ValueError: np.nan is an invalid document, expected byte or unicode string.

There is this error, but is it because of the wrong file designation?

df1 is a csv file containing restaurant review stars and review contents, and review is the part containing review contents.

python vector

2022-12-20 07:39

1 Answers

I think some of the df1['review'] are np.nan.

Check it out with this.


2022-12-20 08:36

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.