sns histplot nan values 1

sns histplot nan values

seaborn.distplot(data['alcconsumption'].notnull(), hist=True)

Here is what the above code is Doing:
1. We’re using the seaborn library to create a distplot of the alcconsumption column.
2. We’re setting the hist parameter equal to True to plot a histogram.
3. We’re setting the kde parameter equal to False to remove the density line from the histogram.
4. We’re setting the color parameter equal to green to change the color of the histogram.
5. We’re setting the rug parameter equal to True to draw a small vertical tick at each observation.
6. We’re setting the bins parameter equal to 20 to show 20 bins in the histogram.
7. We’re setting the vertical parameter equal to False to plot the histogram horizontally.
8. We’re setting the axlabel parameter equal to ‘Alcohol Consumption’ to label the x-axis.
9. We’re setting the label parameter equal to ‘Distplot of alcconsumption’ to label the plot.
10. We’re setting the figsize parameter equal to (10,8) to change the size of the plot.

Similar Posts