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

Update comp.py debugged #286

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

Conversation

Jinyoung6177
Copy link

line 135 the 'Commodity sums' has classifications(Created, Consumed etc.) in column1 and detailed processes and commodities in column2. And these columns have no name in Excel file. In esum dataframe the names of these columns are shown as 'Unnamed: 0' and 'Unnamed: 1'. And we set these columns as index by using '''esum.set_index(['Unnamed: 0','Unnamed: 1'], inplace=True)'''.

Line 140: The only column left in esum is the tuple comprised of year, site and commodity(Elec, CO2, etc.). So if we split this tuple we get for instance '2020', 'Mid', 'Elec'.
Since there are 3 values, I changed the name of the list from 'sitcom' to 'yrsitcom' so that I can extract 'com' out of yr, sit, com in yrsitcom in line 142.

The only problem left:
When I run the run_single_year.py, I get the values for '2020.North.Elec','2020.Mid.Elec','2020.South.Elec','2020.('North','Mid','South').Elec'. And these are the column names for the 'Commodity sums' as well. But weirdly the values for '2020.South.Elec' and '2020.('North','Mid','South').Elec' are exactly the same and they just duplicate each other. So in the 'Comparison' generated by comp.py the values for '2020.South.Elec' are doubled and we get an overestimated number for the created energy over the defined timesteps.

line 135 the 'Commodity sums' has classifications(Created, Consumed etc.) in column1 and detailed processes and commodities in column2. And these columns have no name in Excel file. In esum dataframe the names of these columns are shown as 'Unnamed: 0' and 'Unnamed: 1'. And we set these columns as index by using '''esum.set_index(['Unnamed: 0','Unnamed: 1'], inplace=True)'''.

Line 140: The only column left in esum is the tuple comprised of year, site and commodity(Elec, CO2, etc.). So if we split this tuple we get for instance '2020', 'Mid', 'Elec'.
Since there are 3 values, I changed the name of the list from 'sitcom' to 'yrsitcom' so that I can extract 'com' out of yr, sit, com in yrsitcom in line 142.

The only problem left:
When I run the run_single_year.py, I get the values for '2020.North.Elec','2020.Mid.Elec','2020.South.Elec','2020.('North','Mid','South').Elec'. And these are the column names for the 'Commodity sums' as well. But weirdly the values for '2020.South.Elec' and '2020.('North','Mid','South').Elec' are exactly the same and they just duplicate each other. So in the 'Comparison' generated by comp.py the values for '2020.South.Elec' are doubled and we get an overestimated number for the created energy over the defined timesteps.
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