Manual feature extraction II
You're working on a variant of the ANSUR dataset, height_df
, where a person's height was measured 3 times: height_1
, height_2
, height_3
. Add a feature with the mean height to the dataset, then drop the 3 original features.
Este ejercicio forma parte del curso
Dimensionality Reduction in Python
Instrucciones del ejercicio
- Add a feature with the mean height to the dataset. Use the
.mean()
method withaxis=1
. - Drop the 3 original height features from the dataset.
Ejercicio interactivo práctico
Prueba este ejercicio y completa el código de muestra.
# Calculate the mean height
height_df['height'] = height_df[[____]].____
# Drop the 3 original height features
reduced_df = height_df.drop(____, axis=1)
print(reduced_df.head())