diff --git a/3-Data-Visualization/11-visualization-proportions/README.md b/3-Data-Visualization/11-visualization-proportions/README.md index bce02c2c..739c99b8 100644 --- a/3-Data-Visualization/11-visualization-proportions/README.md +++ b/3-Data-Visualization/11-visualization-proportions/README.md @@ -56,8 +56,9 @@ Take this data and convert the 'class' column to a category: ```python cols = mushrooms.select_dtypes(["object"]).columns mushrooms[cols] = mushrooms[cols].astype('category') +edibleclass = mushrooms.groupby(["class"]).count() ``` -Now, if you print out the mushrooms data, you can see that it has been grouped into categories according to the poisonous/edible class: +Now, if you print out the ```edibleclass```, you can see that it has been grouped into categories according to the poisonous/edible class: | | cap-shape | cap-surface | cap-color | bruises | odor | gill-attachment | gill-spacing | gill-size | gill-color | stalk-shape | ... | stalk-surface-below-ring | stalk-color-above-ring | stalk-color-below-ring | veil-type | veil-color | ring-number | ring-type | spore-print-color | population | habitat |