Skip to content

Fix incorrect column slicing in notebook-covidspread.ipynb#744

Merged
leestott merged 2 commits intomainfrom
copilot/implement-changes-from-issue-724
Feb 27, 2026
Merged

Fix incorrect column slicing in notebook-covidspread.ipynb#744
leestott merged 2 commits intomainfrom
copilot/implement-changes-from-issue-724

Conversation

Copy link
Contributor

Copilot AI commented Feb 27, 2026

After groupby('Country/Region').sum(), each row retains three non-date columns — Province/State, Lat, Long — before date columns begin. The original [2:] slice skipped only Lat/Long, causing Province/State to appear in plots and errors in downstream mkframe calls.

Changes

  • Slicing: [2:][3:] in the US plotting cells to skip all three non-date metadata columns
  • Drop columns: Added Province/State to drop(columns=[...]) on infected, recovered, deaths
  • Note text: Updated to accurately describe three columns being removed and reference the correct slice index
  • Output cell: Regenerated plot output to reflect corrected slicing

Track translation progress by opening a draft PR using this template and checking off the translations completed

Each lesson includes a translation of the README.md and the Assignment.md file, if available. Only mark the lesson complete if both those files are translated per lesson, please.

  • 1

  • 1-1

  • 1-2

  • 1-3

  • 2

  • 2-1

  • 2-2

  • 2-3

  • 2-4

  • 3

  • 3-1

  • 3-2

  • 3-3

  • 4

  • 4-1

  • 5

  • 5-1

  • 5-2

  • 5-3

  • 6

  • 6-1

  • 6-2

  • 6-3

  • 6-4

  • 6-5

  • 6-6

  • 7

  • 7-1

  • 7-2

  • 7-3

  • 7-4

  • Quiz (add a file in the quiz-app with all localizations)

Original prompt

This section details on the original issue you should resolve

<issue_title>Issue</issue_title>
<issue_description>Look at #724 and create a new PR Implementing the changes required </issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Co-authored-by: leestott <2511341+leestott@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement changes required from issue #724 Fix incorrect column slicing in notebook-covidspread.ipynb Feb 27, 2026
@leestott leestott marked this pull request as ready for review February 27, 2026 08:58
@leestott leestott merged commit 1e2e580 into main Feb 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issue

2 participants