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:\Users\si\Desktop\11.csv")
2024-03-23 20:56:52
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:\Users\si\Desktop\11.csv")