pyecharts 词云图

导包
from pyecharts.charts import WordCloud
import numpy as np
import pandas as pd

数据
data = pd.read_csv(r"C:\Users\wendyjoy1216\Pyecharts可视化课程课件\data\beijing.csv")
data = data["岗位技能"].str.cat(sep=" ").split(" ")
data_set = set(data)
data_set.remove("数据分析")
data_count = []
for word in data_set:
data_count.append( (word,data.count(word)))

绘图
wordcloud = (WordCloud()
.add("岗位技能词云图",data_count))
wordcloud.render_notebook()


词云图.png

你可能感兴趣的:(pyecharts 词云图)