Lab 1: Introduction to Pandas & Data Types — Rubric

Total: 100 points

Component Criteria Points
Submission format Both the completed notebook (.ipynb) and a PDF export of it are submitted to Canvas by the deadline. 10
Runs cleanly Notebook runs top-to-bottom (Restart & Run All) with no errors; every code cell's output (tables, printed values, charts) is visible in the submitted file, not just the code. 10
Task 1 — Load & inspect Loads data_src into a DataFrame named df and shows the first five rows. 5
Task 2 — Column inventory Raw cell lists every column (except GeoLocation) with a correct data type (str/int/float/bool) and scale (nominal/ordinal/interval/ratio/NA), following the treatment rules given (booleans as nominal, dates as interval, free text/URLs as NA). 15
Task 3 — Ordinal count Correctly reports the number of ordinal columns from Task 2's inventory. 3
Task 4 — Ratio count Correctly reports the number of ratio columns from Task 2's inventory. 3
Task 5 — Region value_counts Uses .value_counts() on Region and correctly identifies the count of distinct regions and the most common one. 5
Task 6 — Region bar chart Builds a bar chart from the Task 5 value counts using .plot.bar(). 5
Task 7 — Ordinal ordering Runs the provided pd.Categorical() cell, calls .value_counts(sort=False) on Evidence_Ordered, plots it with .plot.bar(), and gives a thoughtful written comparison to the unordered version. 10
Task 8 — Melt wide → long Correctly reshapes tb_wide into tb_long with .melt(id_vars=["country","year"], var_name="group", value_name="cases"). 6
Task 9 — Pivot long → wide Correctly reshapes tb_long back to wide with .pivot() and confirms it matches the original tb_wide. 6
Task 10 — Region × Evidence crosstab Builds evidence_wide via pd.crosstab() and evidence_long via .melt(), correctly answers both sub-questions (top region for Eruption Observed; count of zero-value combinations), and gives a sound explanation of which format made each question easier. 10
Task 11 — Grouped boxplot Uses df.groupby("Region")["Elevation"] to build a per-region dictionary, plots it as a boxplot with .plot.box(), and correctly names a region with a notably higher/lower elevation. 8
Wrap-up reflection 2–3 sentences giving a genuine, specific answer to the reflection prompt (not just restating the question). 4
Total 100