对于一个“普通”的Python类,我习惯于可以任意添加额外的属性。# Now it has this attribute and I can use it:
print(my_object.my_new_attribute) 此命令运行时没有错误,并打印Hello world但是,我似乎无法使用numpy.ndarray做到这一点。这将输出<class 'numpy.ndarray'>,验证我们确实有某个类的对象,但是当尝试添加新属性时,
我试图在一个子图中显示与我的dataframe df中的每个列对应的所有框图。3), 3) for name in names: y = y + 1
不幸的是我遇到了一个错误AttributeError回溯(最近一次调用)为3y= 0;4名称中的名称:->5 sns.boxplot(x= dfname,ax=axesy) 6 y=y+1 AttributeError: