cast_dict = {'sesso' : 'category', 'altezza' : 'float64'}

df = df.astype(cast_dict)