Import sys (#98)

* import sys package and remove unnecassary imports

* add encoding when reading csv files to the old (and soon depreciated) build_retro_cost script
This commit is contained in:
lisazeyen 2021-04-23 11:26:53 +02:00 committed by GitHub
parent 55eb722ead
commit b979441462
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -182,7 +182,8 @@ def prepare_building_stock_data():
# add for some missing countries floor area from other data sources
area_missing = pd.read_csv(snakemake.input.floor_area_missing,
index_col=[0, 1], usecols=[0, 1, 2, 3])
index_col=[0, 1], usecols=[0, 1, 2, 3],
encoding='ISO-8859-1')
area_tot = area_tot.append(area_missing.unstack(level=-1).dropna().stack())
area_tot = area_tot.loc[~area_tot.index.duplicated(keep='last')]

View File

@ -6,9 +6,8 @@ import pandas as pd
idx = pd.IndexSlice
import numpy as np
import scipy as sp
import xarray as xr
import re, os
import re, os, sys
from six import iteritems, string_types