Skip to content

Commit

Permalink
Import sys (#98)
Browse files Browse the repository at this point in the history
* import sys package and remove unnecassary imports

* add encoding when reading csv files to the old (and soon depreciated) build_retro_cost script
  • Loading branch information
lisazeyen authored Apr 23, 2021
1 parent 55eb722 commit b979441
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 2 additions & 1 deletion scripts/build_retro_cost.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')]

Expand Down
3 changes: 1 addition & 2 deletions scripts/prepare_sector_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,8 @@
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

Expand Down

0 comments on commit b979441

Please sign in to comment.