import numpy as np
import pandas as pd
from sklearn import datasets
# X,y = datasets.load_breast_cancer(return_X_y=True)
MNIST = datasets.fetch_mldata('MNIST original')
X, y = MNIST['data'], MNIST['target']
y = np.vstack(y)
print(X.shape)
print(y.shape)
data = np.hstack((X,y))
print(data.shape)
data = pd.DataFrame(data)
data.to_csv(r'E:\dataset\clusterData\MNIST.csv',header=None,index=None)