sudo python -m pip install --upgrade pip
isinstance(part_1_2.ix[:,i],int)
data_new = pd.concat([data_new, pd.DataFrame(y,columns=[part_1_2.ix[:, i].name])], axis=1)
from sklearn.preprocessing import LabelEncoder
y = le.fit_transform(part_1_2.ix[:, i].astype('str')).reshape(-1, 1)
得到的数据是ndarray类型,可以用pd.Series或者pd.Dataframe转换
Series列名为name=;Dataframe为columns=[]