#datafram的列获取
data.iloc[:, data.columns != “Y”]
#转ayyay,再由二维转成一维
X_temp = np.array(data.iloc[:, data.columns != “Y”], dtype=“float”)
y_temp = y_temp.ravel() # 将二维标签矩阵转为一维
#datafram的行获取
trainsum1 = data.loc[data.hold_main_defect.apply(lambda x: x == 0)]
python获取数据
于 2023-03-27 17:03:48 首次发布