MIL-003: Read and analyse with pandas #28

Merged
Tirsvad merged 4 commits from mil-003-pandas-analysis into main 2026-10-13 09:30:14 +02:00
Owner

Delivers MIL-003: the pandas half of both lectures.

  • src/weather/analysis.py: read_data (one pandas.read_csv call), to_data_dict, to_temp_list, average_temp, average_temp_mean, max_temp, row_for_day, hottest_row, day_in_fahrenheit
  • tests/test_analysis.py: one test per Go/No-Go criterion, including that the csv and pandas readers agree
  • pandas stays an optional extra; dependencies = []; csv_reader still imports no pandas

Differences from the lecture, so a reader can compare: row selection uses data.loc[...] (same result as data[...]), and hottest_row reuses max_temp so the maximum is stated once.

Checks run locally (Python 3.13, Windows): pytest (27 passed), ruff check, ruff format --check, mypy (strict), doxygen Doxyfile (exit 0, no warnings).

Review: RC-011 (Go, mode: autonomous, not independent).

Closes #12
Closes #13
Closes #14
Closes #15
Closes #16

Delivers MIL-003: the pandas half of both lectures. - `src/weather/analysis.py`: `read_data` (one `pandas.read_csv` call), `to_data_dict`, `to_temp_list`, `average_temp`, `average_temp_mean`, `max_temp`, `row_for_day`, `hottest_row`, `day_in_fahrenheit` - `tests/test_analysis.py`: one test per Go/No-Go criterion, including that the csv and pandas readers agree - `pandas` stays an optional extra; `dependencies = []`; `csv_reader` still imports no pandas Differences from the lecture, so a reader can compare: row selection uses `data.loc[...]` (same result as `data[...]`), and `hottest_row` reuses `max_temp` so the maximum is stated once. Checks run locally (Python 3.13, Windows): `pytest` (27 passed), `ruff check`, `ruff format --check`, `mypy` (strict), `doxygen Doxyfile` (exit 0, no warnings). Review: RC-011 (Go, mode: autonomous, not independent). Closes #12 Closes #13 Closes #14 Closes #15 Closes #16
Tirsvad added 4 commits 2026-10-13 09:30:12 +02:00
Task: MIL-003#1
Task: MIL-003#2
Task: MIL-003#3
Task: MIL-003#4
Task: MIL-003#5
Resolve pending commit links
CI / checks (push) Successful in 1m7s
CI / checks (pull_request) Successful in 1m13s
52100700d5
Tirsvad merged commit 99558b4ef8 into main 2026-10-13 09:30:14 +02:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Tirsvad-Udemy-100-days-of-code/025-weather#28