retro: fix renaming u_values subsectors and btype (#127)

by not looping the .replace() across all columns of the dataframe.

Circumvents: TypeError: Cannot compare types 'ndarray(dtype=float64)' and 'str'
This commit is contained in:
Fabian Neumann 2021-05-25 15:51:38 +02:00 committed by GitHub
parent bea8194b7b
commit 32365312da
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -253,7 +253,8 @@ def prepare_building_stock_data():
axis=1, inplace=True, errors="ignore")
u_values = u_values.apply(lambda x: x.replace(rename_sectors))
u_values.subsector.replace(rename_sectors, inplace=True)
u_values.btype.replace(rename_sectors, inplace=True)
# for missing weighting of surfaces of building types assume MFH
u_values["assumed_subsector"] = u_values.subsector