BuildlyBuildly
DashboardExercisesProfileHelp
Back to all

Practice: Seaborn Categorical

Drills tagged with this skill, unpassed first. Pass them all to mark the skill ready for scenarios.

Module 4: Data Visualization

0/3 done
Exercises (0/3)
  • 1
    Count Orders by Status
    Context. Ten orders, each with a status. How many were delivered, pending, cancelled? countplot counts and draws in one call. Your task. Write make_status_count(df) that draws a seaborn count plot of the status column and returns the axes. Example. sns.countplot(...) needs only x="status" — no counting on your side. Notes. Bars follow first-appearance order in the data: delivered, pending, cancelled.
    7 min· 10 XP
  • 2
    Average Score per Class
    Context. Three classes, two test scores each. The question is which class averages highest — and sns.barplot aggregates for you. Your task. Write make_class_averages(df) that draws a seaborn bar plot of score per class with errorbar=None, sets a title mentioning "Average", and returns the axes. Example. Class A's bar lands at 80 — the mean of 78 and 82. Notes. barplot shows the mean per category by default. errorbar=None hides the uncertainty whiskers.
    7 min· 10 XP
  • 3
    Quarterly Sales Heatmap
    Context. Sales by region and quarter — a 3×4 table of numbers. A heatmap turns the table into color, and annot=True keeps the numbers visible. Your task. Write make_heatmap(grid) that draws a seaborn heatmap of the grid with the values printed in each cell, sets a title, and returns the axes. Example. sns.heatmap(grid, annot=True) — the grid is already a table, so it goes in as-is. Notes. No melting or pivoting needed here; heatmap wants exactly this rows-by-columns shape.
    7 min· 10 XP