ValueError: np.nan is an invalid document

Replace "pp.fit(X2_train.astype("U"),y2_train.astype("U"))" by
"pp.fit((X2_train.astype("U").str.lower()),(y2_train.astype("U").str.lower()))"

Replace "predictions7=pp.predict(X2_test)" by "predictions7=pp.predict(X2_test.astype("U"))"

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top