, 0, 1, 0],
[0, 1, 0, 0, 0, 1, 0, 1],
[1, 0, 1, 0, 1, 0, 0, 0]], dtype=int64)
'''
# 获取特征名称...feature_names = count.get_feature_names()
# 查看特征名称
feature_names
# ['beats', 'best', 'both', 'brazil...tfidf = TfidfVectorizer()
feature_matrix = tfidf.fit_transform(text_data)
# 展示 tf-idf 特征矩阵
feature_matrix.toarray..., 0. ]])
'''
# 展示 tf-idf 特征矩阵
tfidf.get_feature_names()
# ['beats', 'best', 'both'...brazil', 'germany', 'is', 'love', 'sweden']
# 创建数据帧
pd.DataFrame(feature_matrix.toarray(), columns=tfidf.get_feature_names