无码av一区二区三区无码,在线观看老湿视频福利,日韩经典三级片,成 人色 网 站 欧美大片在线观看

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

黑馬程序員python教程,8天python從入門到精通,學(xué)python看這套就

2023-02-27 05:34 作者:lzyj7897  | 我要投稿

P110


from pyecharts.options import *

from pyecharts.charts import Bar

from pyecharts.globals import ThemeType

from pyecharts.charts import Timeline


with open(r"1960-2019全球GDP數(shù)據(jù).csv", 'r', encoding="GB2312") as f:

? ? lines = f.readlines()

? ? lines.pop(0)

data = {}

for line in lines:

? ? year = line.split(',')[0]

? ? country = line.split(',')[1]

? ? GDP = float(line.split(',')[2])

? ? try:

? ? ? ? data[year].append([country, GDP])

? ? except:

? ? ? ? data[year] = []

? ? ? ? data[year].append([country, GDP])

timeline = Timeline(init_opts=InitOpts(

? ? theme=ThemeType.ROMA, width="1500px", height="700px", animation_opts=AnimationOpts(animation_duration_update=100)))


for year in data.keys():

? ? data[year].sort(key=lambda element: element[1], reverse=True)

? ? bar = Bar().add_yaxis(

? ? ? ? "GDP", [(x[1]/10**8) for x in data[year][:8]][::-1], label_opts=LabelOpts(position="right")).add_xaxis([x[0] for x in data[year][:8][::-1]]).reversal_axis()

? ? timeline.add(bar, time_point=year)

timeline.add_schema(is_auto_play=True,

? ? ? ? ? ? ? ? ? ? is_timeline_show=True, play_interval=600)

timeline.render("GDP.html")


黑馬程序員python教程,8天python從入門到精通,學(xué)python看這套就的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
兴安盟| 温州市| 巩义市| 朝阳区| 翁牛特旗| 出国| 丁青县| 黎城县| 毕节市| 尤溪县| 大石桥市| 施甸县| 巴中市| 大关县| 灵宝市| 舞阳县| 梓潼县| 奇台县| 衡阳市| 林周县| 东莞市| 兴山县| 京山县| 富宁县| 措勤县| 田东县| 安泽县| 获嘉县| 高碑店市| 佳木斯市| 宁远县| 徐汇区| 紫金县| 荆州市| 奉化市| 贡嘎县| 寿阳县| 商都县| 泰安市| 延边| 克什克腾旗|