# -*- coding: utf-8 -*-# @Time:2020/12/16 20:50# @Author:hanqi# FileName:馬保國.py# Software:PyCharmimport pandas as pdimport matplotlib.pyplot as pltplt.style.use('ggplot')# 微博指數import gopup as gpdf_index = gp.weibo_index(word="馬保國", time_type="3month")df_index1 = gp.weibo_index(word="雷雷", time_type="3month")# df_index2 = gp.weibo_index(word="太極", time_type="3month")df = pd.merge(df_index, df_index1, how='right', on='index')# df = pd.merge(df, df_index2, how='left', on='index')# df_index['日期'] = df_index.index# print(df_index)# ax = df_index.plot()# ax = df_index1.plot()ax = df.plot()# ax.legend('')ax.set_title("馬保國和雷雷微博指數變化圖", fontsize=20)ax.set_xlabel('日期', fontsize=10)ax.set_ylabel('微博指數', fontsize=10)plt.show()
馬保國老師和雷雷的微博指數變化圖
最新評論