Quiz on Plotting Categorical Data

Test yourself on applying seaborn categorical plots as per data needs.

Quiz on seaborn’s categorical plots

1

We have a dataset containing information on students who have participated in debates. The variable participated is a categorical variable containing two unique values: “Yes” represents the students who participated and “No” represents the students who did not participate. We have another variable, gender, to represent the gender of students. We’re interested in visualizing the ratio of male to female students who participated in debates. How can we represent it using seaborn’s countplot() function?

A)

We can achieve this by specifying x='gender' and y='participated'.

B)

We can achieve this by specifying x='gender' and hue='participated'.

C)

Both A and B

D)

None of the above

Question 1 of 50 attempted

Get hands-on with 1400+ tech skills courses.