Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix EIA 860m Changelog bugs #3694

Merged
merged 3 commits into from
Jul 3, 2024
Merged

Fix EIA 860m Changelog bugs #3694

merged 3 commits into from
Jul 3, 2024

Conversation

cmgosnell
Copy link
Member

@cmgosnell cmgosnell commented Jun 24, 2024

Overview

Closes #3614.

What problem does this address?

What did you change?

Testing

How did you make sure this worked? How can a reviewer verify this?

To-do list

@cmgosnell cmgosnell marked this pull request as ready for review June 27, 2024 15:37
Comment on lines +134 to 138
eia860m_changelog.loc[~report_date_max_mask, "valid_until_date"] = (
eia860m_changelog.sort_values(gens_idx, ascending=False)
.groupby(gen_idx_no_date)["report_date"]
.transform("shift")
.fillna(eia860m_changelog.report_date_max)
Copy link
Contributor

Choose a reason for hiding this comment

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

It skeeved me out to see value assignment to a differently-sorted and different length series, but it seems to work just fine. I guess pandas must match on the index.

Copy link
Contributor

@TrentonBush TrentonBush left a comment

Choose a reason for hiding this comment

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

Looks good to me!

@cmgosnell cmgosnell added this pull request to the merge queue Jul 3, 2024
Merged via the queue into main with commit 548401f Jul 3, 2024
12 checks passed
@cmgosnell cmgosnell deleted the eia860m_changelog_bugs branch July 3, 2024 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

core_eia860m__changelog_generators contains NULL valid_until_date values
2 participants