Closed jnnr closed 3 years ago
I get the following error message when executing the postprocessing rule:
Traceback (most recent call last):
File "scripts/postprocessing.py", line 27, in
Does this error also occur to you or do you know it, @jnnr ?
It works for me if I change line 1033 in the postprocessing file from
df_renewable_sum = df_renewable.groupby(['region'], axis=1).sum()
to
df_renewable_sum = df_renewable.groupby(level = ['region'], axis=1).sum()
.
It works for me if I change line 1033 in the postprocessing file from
df_renewable_sum = df_renewable.groupby(['region'], axis=1).sum()
todf_renewable_sum = df_renewable.groupby(level = ['region'], axis=1).sum()
.
Have you checked if this leads to the correct results? If you call groupby in the original way, the keyword would be by
, not level
.
It works for me if I change line 1033 in the postprocessing file from
df_renewable_sum = df_renewable.groupby(['region'], axis=1).sum()
todf_renewable_sum = df_renewable.groupby(level = ['region'], axis=1).sum()
.Have you checked if this leads to the correct results? If you call groupby in the original way, the keyword would be
by
, notlevel
.
I am not sure where the difference would occur. But the resulting scalars for RE production remain the same. An when looking into df_renewable and df_renewable_sum during execution, the code also does what it should (adding up the RE production by country). Replacing "level" by "by" in the code results (unsurprisingly) in the same key error as occurred initially.
The above-mentioned error disappeared when I used pandas 1.1.0 (prior to that I used either version 0.24 or 0.25).
With this PR, the postprocessing does not only export timeseries for each bus, but also timeseries for each component type.