ZhangZhihui's Blog  

2022年1月23日

摘要: 阅读全文
posted @ 2022-01-23 16:52 ZhangZhihuiAAA 阅读(20) 评论(0) 推荐(0)

2022年1月22日

摘要: 阅读全文
posted @ 2022-01-22 17:48 ZhangZhihuiAAA 阅读(62) 评论(0) 推荐(0)

2022年1月9日

摘要: The default is tight_layout. plt.subplots() plt.subplots(constrained_layout=True) constrained_layout can autoextend. 阅读全文
posted @ 2022-01-09 11:13 ZhangZhihuiAAA 阅读(77) 评论(0) 推荐(0)
 
摘要: for tick in ax2.get_xticklabels(): tick.set_rotation(45) tick.set_size(8) tick.set_ha('right') 阅读全文
posted @ 2022-01-09 10:40 ZhangZhihuiAAA 阅读(63) 评论(0) 推荐(0)

2022年1月8日

摘要: def axes_show_y_value(axes, x_data, y_data): for x, y in zip(x_data, y_data): axes.annotate(str(y), # this is the text (x, y), # these are the coordin 阅读全文
posted @ 2022-01-08 18:07 ZhangZhihuiAAA 阅读(63) 评论(0) 推荐(0)
 
摘要: Python code: import base64 from io import BytesIO def fig_to_html(fig): """ Convert a matplotlib.Figure object to html image source :param fig: :retur 阅读全文
posted @ 2022-01-08 16:32 ZhangZhihuiAAA 阅读(42) 评论(0) 推荐(0)

2022年1月7日

摘要: import pandas as pd df = pd.DataFrame([[2001, 'D', 2], [2004, 'T', 3], [2003, 'T', 5], [2001, 'T', 4], [2004, 'D', 7]], columns=['year', 'type', 'cnt' 阅读全文
posted @ 2022-01-07 22:14 ZhangZhihuiAAA 阅读(27) 评论(0) 推荐(0)
 
摘要: print(df_year_month) print(' ') print(df_year_month.index) print(df_year_month.index.tolist()) print(' ') print(df_year_month.index.levels[0]) print(d 阅读全文
posted @ 2022-01-07 22:12 ZhangZhihuiAAA 阅读(28) 评论(0) 推荐(0)

2021年12月9日

摘要: 阅读全文
posted @ 2021-12-09 22:16 ZhangZhihuiAAA 阅读(33) 评论(0) 推荐(0)

2021年2月10日

摘要: Remove log redirection: ZUBT:/home/scnzzh $> crontab -l #00 09 * * * ~/zzh.py >> ~/zzh_`date +\%Y\%m\%d_\%H\%M\%S`.log 2>&1 #00 10 * * * ~/zzh.py >> ~ 阅读全文
posted @ 2021-02-10 09:00 ZhangZhihuiAAA 阅读(133) 评论(0) 推荐(0)