本文主要介绍通过python实现数据聚类、脚本开发、办公自动化。词频数据渲染词云图导出HTML。

python wordCloud.py
from pyecharts.charts import WordCloud
from pyecharts import options as opts
# 假设我们有以下词频数据
word_freq = {
'Python': 1000,
'词云': 800,
'生成': 600,
'教程': 400,
'pyecharts': 200,
'数据可视化': 300,
'图表': 250,
'Python2': 1000,
'词云2': 800,
'生成2': 600,
'教程2': 400,
'pyecharts2': 200,
'数据可视化2': 300,
'图表2': 250,
'Python3': 1000,
'词云3': 800,