python - 'function' object has no attribute 'data' -
from sklearn import datasets iris=datasets.load_iris x = iris.data --------------------------------------------------------------------------- attributeerror traceback (most recent call last) <ipython-input-15-12a2d725131f> in <module>() ----> 1 x = iris.data attributeerror: 'function' object has no attribute 'data load iris dataset sklearn ,but when write "x = iris.data",an error occur "attributeerror: 'function' object has no attribute 'data'"
load_iris
function , needs called such:
from sklearn import datasets iris=datasets.load_iris() x = iris.data
Comments
Post a Comment