成功解决AttributeError: ‘JointGrid‘ object has no attribute ‘annotate‘

简介: 成功解决AttributeError: ‘JointGrid‘ object has no attribute ‘annotate‘


目录

解决问题

解决思路

解决方法


 

 

 

解决问题

1. Traceback (most recent call last):
2.   File "F:\test2021011.py", line 60, in <module>
3.     JointGridScatterPlot(col_nums02,data_frame)
4.   File "F:\site-packages\DataVisualize_Functions2D.py", line 222, in JointGridScatterPlot
5.     fg.annotate(stats.pearsonr)
6. AttributeError: 'JointGrid' object has no attribute 'annotate'

 

 

 

解决思路

属性错误:'JointGrid'对象没有'annotate'属性

 

 

 

 

解决方法

1.     fg=sns.JointGrid(x=cols[0],y=cols[1],data=data_frame,)
2.     fg=fg.plot_joint(plt.scatter,color='m',edgecolor='white')             
3.     fg.annotate(stats.pearsonr)

JointGrid类中没有该方法,建议升级或者更新包的版本。

 

相关文章
|
2月前
|
计算机视觉 Python
解决 NoneType‘ object has no attribute ‘astype’ 问题
解决 NoneType‘ object has no attribute ‘astype’ 问题
30 0
|
6月前
|
存储 JSON 数据格式
数据集加载时报错'dict' object has no attribute 'requests‘
数据集加载时报错'dict' object has no attribute 'requests‘
118 5
|
4月前
AttributeError: 'NoneType' object has no attribute 'to_capabilities'
AttributeError: 'NoneType' object has no attribute 'to_capabilities'
386 0
|
4月前
AttributeError ‘NoneType‘ object has no attribute ‘to_capabilities‘
AttributeError ‘NoneType‘ object has no attribute ‘to_capabilities‘
109 0
|
5月前
|
数据采集
运行爬虫时报错AttributeError—— 'str' object has no attribute 'capabilities'
运行爬虫时报错AttributeError—— 'str' object has no attribute 'capabilities'
303 0
|
5月前
'WebDriver' object has no attribute 'find_element_by_tag_name'
'WebDriver' object has no attribute 'find_element_by_tag_name'
125 0
|
7月前
|
Java
【面试题精讲】Object类的常见方法有哪些?
【面试题精讲】Object类的常见方法有哪些?
|
8月前
|
Java API 开发工具
Java之API详解之Object类的详细解析(下)
Java之API详解之Object类的详细解析(下)
40 0
|
6天前
|
C#
c# 所有类的最终基类:Object
c# 所有类的最终基类:Object
6 0
|
21天前
|
XML JSON Java
作为所有类的顶层父类,没想到Object的魔力如此之大!
在上一篇博文中我们提到了Java面向对象的四大特性,其中谈及“抽象”特性时做了一个引子,引出今天的主人公Object,作为所有类的顶级父类,Object被视为是James.Gosling的哲学思考,它高度概括了事务的自然与社会行为。
53 13