日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程语言 > python >内容正文

python

python pyecharts 折线图_python数据大屏pyecharts库2020.8.31

發布時間:2024/7/5 python 35 豆豆
生活随笔 收集整理的這篇文章主要介紹了 python pyecharts 折线图_python数据大屏pyecharts库2020.8.31 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

數據大屏V0.1-2020.8.31

前言

千辛萬苦,找到了python能實現數據大屏庫pyecharts。

1、https://gallery.pyecharts.org/#/Page/page_simple_layout

2、主要是3個類,Grid:并行多圖,Page:順序多圖,Tab:選項卡多圖。

那就把采集的CSV做一個數據大屏吧

1、引入庫

2、# -*- coding: utf-8 -*-

3、import jieba

4、import pandas as pd #讀取文件的庫

5、from pyecharts import options as opts

6、# 用于圖形數據的添加以及展現?? Bar Line Pie 分別是柱狀圖 折線圖 餅圖

7、from pyecharts.charts import Pie,WordCloud,Page, Tab,Bar,Gauge,Liquid

8、讀取CSV

9、報錯:UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc3 in position 4: invalid continuation byte

10、編輯讀取格式:df=pd.read_csv("python.csv",encoding='gb2312')? # 讀取csv文件的操作

11、單個圖表(詞云)

12、范例1:https://blog.csdn.net/qq_42169061/article/details/104927800

13、報錯:ImportError: cannot import name 'WordCloud' from 'pyecharts' (d:\Users\Administrator\Anaconda3\lib\site-packages\pyecharts\__init__.py)

14、范例2:https://blog.csdn.net/qtlyx/article/details/100811127

15、x = list(df['月薪2'])

16、y = list(df['單位名稱'])

17、wordcloud = WordCloud()

18、wordcloud.add("", zip(y, x), word_size_range=[20, 100], shape='circle')

19、wordcloud.render()

20、大屏

總結

以上是生活随笔為你收集整理的python pyecharts 折线图_python数据大屏pyecharts库2020.8.31的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。