16 lines
409 B
Python
16 lines
409 B
Python
from wordcloud import WordCloud
|
|
import pandas as pd
|
|
|
|
df = pd.read_csv("clustering_result.csv")
|
|
# 合并所有技术画像文本
|
|
text = " ".join(df["技术画像"].dropna().tolist())
|
|
|
|
# 生成词云
|
|
wc = WordCloud(
|
|
font_path="simhei.ttf", # 中文字体
|
|
background_color="white",
|
|
width=1200, height=600,
|
|
max_words=100
|
|
).generate(text)
|
|
|
|
wc.to_file("赛道关键词词云图.png") |