Sklearn Iris Dataset - Load The Iris Dataset & Split Into Features & Target

Python

 1|  from sklearn.datasets import load_iris
 2|  
 3|  iris = load_iris()
 4|  
 5|  X = pd.DataFrame(data=iris['data'],
 6|                   columns= iris['feature_names'])
 7|  y = pd.Series(diabetes['target'])
Did you find this snippet useful?

Sign up for free to to add this to your code library