Pandas 把数据写入csv
from sklearn import datasets import pandas as pd iris = datasets.load_iris() iris_X = iris.data iris_y = iris.target df=pd.DataFrame(iris_y) df.to_csv(r"C:UserssiDesktop11.csv")
Pandas 把数据写入csv
from sklearn import datasets import pandas as pd iris = datasets.load_iris() iris_X = iris.data iris_y = iris.target df=pd.DataFrame(iris_y) df.to_csv(r"C:UserssiDesktop11.csv")