mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-05-28 18:26:54 +00:00
fix(data analysis visualizer): added back in direction 2 (#56788)
This commit is contained in:
+1
-1
@@ -46,7 +46,7 @@ File name: medical_examination.csv
|
||||
By each number in the `medical_data_visualizer.py` file, add the code from the associated instruction number below.
|
||||
|
||||
1. Import the data from `medical_examination.csv` and assign it to the `df` variable
|
||||
2. Create the `overweight` column in the `df` variable
|
||||
2. Add an `overweight` column to the data. To determine if a person is overweight, first calculate their BMI by dividing their weight in kilograms by the square of their height in meters. If that value is > 25 then the person is overweight. Use the value `0` for NOT overweight and the value `1` for overweight.
|
||||
3. Normalize data by making `0` always good and `1` always bad. If the value of `cholesterol` or `gluc` is 1, set the value to `0`. If the value is more than `1`, set the value to `1`.
|
||||
4. Draw the Categorical Plot in the `draw_cat_plot` function
|
||||
5. Create a DataFrame for the cat plot using `pd.melt` with values from `cholesterol`, `gluc`, `smoke`, `alco`, `active`, and `overweight` in the `df_cat` variable.
|
||||
|
||||
Reference in New Issue
Block a user