像这样的可视化分析全程不用自己动手写一行代码,ChatGPT轻松帮你实现
我们只需要在ChatGPT人工智能中输入指令:请使用Python与Echarts写一个南丁格尔玫瑰图的实践案例,数据和维度可以随机生成,案例中,将数据标签与类别显示在图表中,字体大小设置20号字体加粗
ChatGPT 就能帮我们实现这一操作。
完成代码如下:
from pyecharts import options as opts
from pyecharts.charts import Pie
# 随机生成数据
data = [("分类A", 38.4), ("分类B", 24.2), ("分类C", 17.6), ("分类D", 12.5), ("分类E", 7.3)]
# 创建南丁格尔玫瑰图
def pie_rosetype() -> Pie:
c = (
Pie()
.add(
"",
data,
radius=["30%", "75%"],
center=["50%", "50%"],
rosetype="radius",
label_opts=opts.LabelOpts(is_show=True, position="outside", formatter="{b}: {c}", font_size=20, font_weight="bold"), # 显示标签和类别,设置字体大小和加粗
itemstyle_opts=opts.ItemStyleOpts(
border_width=1, border_color="white"
),
)
.set_global_opts(title_opts=opts.TitleOpts(title="南丁格尔玫瑰图"))
)
return c
# 生成图表
pie = pie_rosetype()
pie.render('pie_rosetype.html')
将代码拿到PyCharm中进行运行就可以得到这个图表分析的结果。
更多ChatGPT 与 数据分析,BI ,数仓的内容如下:
以上内容在:https://edu.csdn.net/lecturer/840?spm=1002.2001.3001.4144
以上内容在:https://edu.csdn.net/lecturer/840?spm=1002.2001.3001.4144
以上内容在:https://edu.csdn.net/lecturer/840?spm=1002.2001.3001.4144
以上内容在:https://edu.csdn.net/lecturer/840?spm=1002.2001.3001.4144
以上内容在:https://edu.csdn.net/lecturer/840?spm=1002.2001.3001.4144
以上内容在:https://edu.csdn.net/lecturer/840?spm=1002.2001.3001.4144
AIGC ChatGPT 职场案例
AI 绘画 与 短视频制作
PowerBI 商业智能 68集
数据库Mysql 8.0 54集
数据库Oracle 21C 142集
Office 2021实战应用
Python 数据分析实战,
ETL Informatica 数据仓库案例实战
Excel 2021实操 100集,
Excel 2021函数大全 80集
Excel 2021高级图表应用89集,
Excel 2021大屏可视化制作 56集
Excel 2021实用技巧300集
PPT 2021 商业汇报实战应用69集
数据分析可视化Tableau 80集
数据可视化FineReport 50集
送你各类文档模板PPT,表格,大屏可视化 超过5000+模板
案例实战 https://edu.csdn.net/combo/detail/2552