我为要用于线性回归模型的数据生成了以下虚拟变量。
data = df.copy() #make a copy of our cleaned dataset called data
X = data[['age', 'blood_pressure', 'specific_gravity', 'albumin', 'sugar',
'pus_cell', 'pus_cell_clumps', 'bacteria', 'blood_glucose_random',
'blood_urea', 'serum_creatinine', 'sodium', 'potassium', 'hemoglobin',
'packed_cell_volume', 'white_blood_cell_count', 'red_blood_cell_count',
'hypertension', 'diabetes_mellitus', 'coronary_artery_disease',
'appetite', 'pedal_edema', 'anemia','classification'
]]
#convert all object/category columns into dummy/indicator variables.
X = pd.get_dummies(data= X, drop_first=True)
X.head()
我希望分类列虚拟变量是classification_ckd
我怎样才能做到这一点?