i am trying to learn about decision trees and I ended up finding a article about decision trees. The goal of the article is to decide if a flower is a iris flower or not but i seem to run into some errors that i hope somebody got the answer to i get two errors like the following:

iris: Bunch iris: inner\_f Instance of 'tuple' has no 'target' member

and

iris: Bunch iris: inner\_f Instance of 'tuple' has no 'data' member

i get these errors at the x = iris.data line and at the y = iris.target line.

Here is the code:

```
import warnings
warnings.filterwarnings('ignore')

import pandas as pd
from sklearn import datasets
from sklearn.model_selection import train_test_split

#load iris data
iris = datasets.load_iris()
x = iris.data
y = iris.target
d = [{"sepal_length":row[0], 
      "sepal_width":row[1], 
      "petal_length":row[2], 
      "petal_width":row[3]} for row in x]
df = pd.DataFrame(d) # construct dataframe
df["types"] = y # assign types
df = df.sample(frac=1.0) # random shuffle rows
df.head()

```

Is there anybody that knows why i get these errors?