correct indexing of DH share
This commit is contained in:
parent
104fa73119
commit
dea48c965a
@ -22,7 +22,7 @@ RS,25,5821
|
|||||||
SI,8.86,1739
|
SI,8.86,1739
|
||||||
ES,0.251589260787732,1273
|
ES,0.251589260787732,1273
|
||||||
SE,50.4,
|
SE,50.4,
|
||||||
UK,2,
|
GB,2,
|
||||||
BY,70,
|
BY,70,
|
||||||
EE,52,5406
|
EE,52,5406
|
||||||
KO,3,207
|
KO,3,207
|
||||||
|
|
@ -860,8 +860,10 @@ def build_district_heat_share(countries: List[str], idees: pd.DataFrame) -> pd.S
|
|||||||
.squeeze()
|
.squeeze()
|
||||||
)
|
)
|
||||||
# make conservative assumption and take minimum from both data sets
|
# make conservative assumption and take minimum from both data sets
|
||||||
|
new_index = pd.MultiIndex.from_product([dh_share.index,
|
||||||
|
district_heat_share.index.get_level_values(1).unique()])
|
||||||
district_heat_share = pd.concat(
|
district_heat_share = pd.concat(
|
||||||
[district_heat_share, dh_share.reindex_like(district_heat_share)], axis=1
|
[district_heat_share, dh_share.reindex(new_index, level=0)], axis=1
|
||||||
).min(axis=1)
|
).min(axis=1)
|
||||||
|
|
||||||
district_heat_share.name = "district heat share"
|
district_heat_share.name = "district heat share"
|
||||||
|
Loading…
Reference in New Issue
Block a user