편집 기록

편집 기록
  • 프로필 nowp님의 편집
    날짜2022.12.01

    파이썬 BoW 벡터 진행 중 오류가 나서 질문 드립니다.


    vect = CountVectorizer(tokenizer = lambda x: text_cleaning(x))
    bow_vect = vect.fit_transform(df1['review'].tolist())
    word_list = vect.get_feature_names()
    count_list = bow_vect.toarray().sum(axis=0)
    

    여기 전까지는 진행됐는데

    ValueError: np.nan is an invalid document, expected byte or unicode string.
    

    이런 오류가 나면서 진행이 안 되네요ㅠㅠ 혹시 어떤 문제가 있어서 그런걸까요? df는 식당 리뷰 형태로, 별점과 리뷰 내용 들어 있는 csv 파일입니다.

  • 프로필 fido81526@gmail.com님의 편집
    날짜2022.12.01

    파이썬 BoW 벡터 진행 중 오류가 나서 질문 드립니다.


    vect = CountVectorizer(tokenizer = lambda x: text_cleaning(x)) bow_vect = vect.fit_transform(df1['review'].tolist()) word_list = vect.get_feature_names() count_list = bow_vect.toarray().sum(axis=0)

    여기 전까지는 진행됐는데 ValueError: np.nan is an invalid document, expected byte or unicode string. 이런 오류가 나면서 진행이 안 되네요ㅠㅠ 혹시 어떤 문제가 있어서 그런걸까요? df는 식당 리뷰 형태로, 별점과 리뷰 내용 들어 있는 csv 파일입니다.