Skip to content

Applying nice_name to bus_carrier grouping#1431

Closed
lukasschirren wants to merge 3 commits intoPyPSA:masterfrom
lukasschirren:patch-1
Closed

Applying nice_name to bus_carrier grouping#1431
lukasschirren wants to merge 3 commits intoPyPSA:masterfrom
lukasschirren:patch-1

Conversation

@lukasschirren
Copy link
Copy Markdown
Contributor

@lukasschirren lukasschirren commented Oct 31, 2025

Closes # (if applicable).
#1430

Changes proposed in this Pull Request

In pypsa/statistics/grouping.py, bus_carrier now:

  • obtains canonical bus.carrier identifiers with self.carrier(n, "Bus", nice_names=False),
  • builds the bus_carrier Series from those canonical values,
  • applies carriers.nice_name to the returned Series only when nice_names=True (display-only).

Checklist

  • Code changes are sufficiently documented; i.e. new functions contain docstrings and further explanations may be given in docs.
  • Unit tests for new features were added (if applicable).
  • A note for the release notes docs/release-notes.md of the upcoming release is included.
  • I consent to the release of this PR's code under the MIT license.

@lkstrp
Copy link
Copy Markdown
Member

lkstrp commented Nov 12, 2025

Hey @lukasschirren,

thanks for the fix. I couldn't reproduce your linked issue, could you quickly add a minimal reproduciable example or/ and add a test for it?

@lkstrp lkstrp added the needs revision PR requires revision based on review feedback label Nov 25, 2025
@lkstrp
Copy link
Copy Markdown
Member

lkstrp commented Feb 11, 2026

Closing this as stale. Feel free to reopen

@lkstrp lkstrp closed this Feb 11, 2026
@lukasschirren
Copy link
Copy Markdown
Contributor Author

Hi @lkstrp, Sorry I totally missed this over christmas and new year. I just created a test and would add it to the PR.

@lukasschirren
Copy link
Copy Markdown
Contributor Author

It seems like I am not able to reopen this PR. I will open a new one with the added test file.

lkstrp added a commit that referenced this pull request Feb 13, 2026
…r grouping in statistics. (#1565)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: lkstrp <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs revision PR requires revision based on review feedback

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants