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

Passing on the principle of netting generation & consumption for generation of specific units. #119

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jpaduart
Copy link
Collaborator

Warning: I removed the df.squeeze() at the end of the netting, because it's an unsafe operation on dataframes:
df.squeeze() gives inconsistent results according to the number of columns in a dataframe. The structure of the columns becomes different if (by coincidence) only a single psr_type (in case of aggregated generation) or a single plant unit (in case of unit generation) is present in the queried data.
A specific column level can be removed with the following operation (=safer than squeeze):
df = df.droplevel(1, level_index)
(removing level_index of the multiindex column axis).

jpaduart added 3 commits July 14, 2021 21:12
- Pass on nett argument to query_generation_per_plant
- Refactor and generalize _calc_nett_and_drop_reduntant_columns to cope
with 3 column levels (unit/psr_type/aggregation)
- Warning: this removes df.squeeze() at the end of the netting.
df.squeeze() gives inconsistent results according to the number of
columns in a dataframe (structure is different if by coincidence only
one technology or plant unit is present in the data).
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