上传文件至「/」
求职者人物画像
This commit is contained in:
16
cluster_wordcloud_plot.py
Normal file
16
cluster_wordcloud_plot.py
Normal file
@@ -0,0 +1,16 @@
|
||||
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")
|
||||
Reference in New Issue
Block a user