Skip to content

Conversation

@wangamber8-collab
Copy link
Contributor

@wangamber8-collab wangamber8-collab commented Dec 31, 2025

… entries

Update the slicing of the series from [2:] to [3:] because indexes 0-2 contains non-date metadata (province, latitude, longitude). The label "longitude" is included in the dataframe and appears in the plot. Additionally, drop the column "province/state" column before the function is called. This is because "province/state" contains non-date data that will cause an error when the function is called.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request fixes incorrect data slicing in a COVID-19 spread analysis notebook that was causing non-date metadata to appear in plots. The fix adjusts the slice indexing from [2:] to [3:] to properly exclude Province/State, Latitude, and Longitude columns, and adds Province/State to the list of columns to be dropped.

Changes:

  • Updated data slicing from [2:] to [3:] to exclude three metadata columns instead of two
  • Added 'Province/State' column to the drop list alongside 'Lat' and 'Long' for all three dataframes
  • Removed trailing whitespace in the mkframe function

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

"metadata": {},
"source": [
"> **Note** how we use `[2:]` to remove first two elements of a sequence that contain geolocation of a country. We can also drop those two columns altogether:"
"> **Note** how we use `[3:]` to remove first three elements of a sequence that contain geolocation of a country. We can also drop those three columns altogether:"
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The documentation states 'geolocation of a country' but actually the three columns include 'Province/State', 'Lat', and 'Long'. Only two of these (Lat/Long) are geolocation data. The description should be updated to accurately describe all three columns being removed, e.g., 'metadata columns (Province/State and geolocation)' or 'non-date metadata'.

Suggested change
"> **Note** how we use `[3:]` to remove first three elements of a sequence that contain geolocation of a country. We can also drop those three columns altogether:"
"> **Note** how we use `[3:]` to remove the first three elements of a sequence that contain non-date metadata (the Province/State and geolocation columns). We can also drop those three columns altogether:"

Copilot uses AI. Check for mistakes.
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.

1 participant