Merge branch 'fix_biomass_transport' of github.com:yerbol-akhmetov/pypsa-eur into yerbol-akhmetov-fix_biomass_transport
This commit is contained in:
commit
26863c17c8
@ -17,20 +17,27 @@ assuming as an approximation energy content of wood pellets
|
||||
@author: bw0928
|
||||
"""
|
||||
|
||||
import platform
|
||||
|
||||
import pandas as pd
|
||||
import tabula as tbl
|
||||
|
||||
ENERGY_CONTENT = 4.8 # unit MWh/t (wood pellets)
|
||||
system = platform.system()
|
||||
encoding = "cp1252" if system == "Windows" else None
|
||||
|
||||
|
||||
def get_countries():
|
||||
pandas_options = dict(skiprows=range(6), header=None, index_col=0)
|
||||
pandas_options = dict(
|
||||
skiprows=range(6), header=None, index_col=0, encoding=encoding
|
||||
)
|
||||
|
||||
return tbl.read_pdf(
|
||||
str(snakemake.input.transport_cost_data),
|
||||
pages="145",
|
||||
multiple_tables=False,
|
||||
pandas_options=pandas_options,
|
||||
encoding=encoding,
|
||||
)[0].index
|
||||
|
||||
|
||||
@ -41,6 +48,7 @@ def get_cost_per_tkm(page, countries):
|
||||
sep=" |,",
|
||||
engine="python",
|
||||
index_col=False,
|
||||
encoding=encoding,
|
||||
)
|
||||
|
||||
sc = tbl.read_pdf(
|
||||
@ -48,6 +56,7 @@ def get_cost_per_tkm(page, countries):
|
||||
pages=page,
|
||||
multiple_tables=False,
|
||||
pandas_options=pandas_options,
|
||||
encoding=encoding,
|
||||
)[0]
|
||||
sc.index = countries
|
||||
sc.columns = sc.columns.str.replace("€", "EUR")
|
||||
|
Loading…
Reference in New Issue
Block a user