Why is the numeric column treated as a categorical column in Microsoft Learning?
Have a look at the comment in that notebook:
# Define preprocessing for categorical features (encode the Age column)

It seems that the data you have is different (maybe only in order) to what is used in the notebook as the Age column is the eigth column (index seven) in the notebook. See also the cell where data is selected from the input file:
# Separate features and labels
features = ['Pregnancies','PlasmaGlucose','DiastolicBloodPressure','TricepsThickness','SerumInsulin','BMI','DiabetesPedigree','Age']
label = 'Diabetic'
X, y = diabetes[features].values, diabetes[label].values