![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据分析
SyliaJason
这个作者很懒,什么都没留下…
展开
-
TypeError: Object of type ‘int64‘ is not JSON serializable
TypeError: Object of type 'int64' is not JSON serializable 错误类型:TypeError: Object of type ‘int64’ is not JSON serializable错误场景:对Numpy和Pandas结果进行json.dumps报错错误分析:1. python3中没有int64这个数据类型,所有的整型都是int2. 报错里的int64指的是<class ‘numpy.int64’>,所以很有迷惑性解决方案:转载 2020-07-06 15:55:57 · 1338 阅读 · 0 评论 -
解决matplotlib.plot显示中文问题
解决matplotlib.plot显示中文问题一、导入库文件二、定义自己的字体属性三、使用一、导入库文件import matplotlibimport matplotlib.pyplot as pltfrom matplotlib.font_manager import FontProperties二、定义自己的字体属性# 定义自定义字体,文件名从查看系统中文字体中来my_font...原创 2019-11-25 15:01:04 · 416 阅读 · 0 评论