【发布时间】:2020-12-12 14:31:29
【问题描述】:
【问题讨论】:
-
请帮忙。 有什么问题,具体是什么问题?请提供minimal reproducible example,并查看How to Ask、help center。
-
我需要创建数据框的术语文档矩阵,如上所示。
标签: python pandas dataframe nlp
【问题讨论】:
标签: python pandas dataframe nlp
from sklearn.feature_extraction.text import CountVectorizer
count_vect = CountVectorizer()
X_train_counts = count_vect.fit_transform(twenty_train.data)
https://scikit-learn.org/stable/tutorial/text_analytics/working_with_text_data.html
【讨论】: