Skip to content

Commit

Permalink
renaming of subst_id to bus_id
Browse files Browse the repository at this point in the history
  • Loading branch information
KathiEsterl committed Sep 28, 2021
1 parent a0f634c commit 23b9e4e
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/egon/data/datasets/DSM_cts_ind.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ def cts_data_import(con, cts_cool_vent_ac_share):
]

ts = db.select_dataframe(
f"""SELECT subst_id, scn_name, p_set FROM
f"""SELECT bus_id, scn_name, p_set FROM
{sources['schema']}.{sources['table']}"""
)

# identify relevant columns and prepare df to be returned

dsm = pd.DataFrame(index=ts.index)

dsm["bus"] = ts["subst_id"].copy()
dsm["bus"] = ts["bus_id"].copy()
dsm["scn_name"] = ts["scn_name"].copy()
dsm["p_set"] = ts["p_set"].copy()

Expand Down Expand Up @@ -209,10 +209,10 @@ def calc_ind_site_timeseries(scenario):
# initialize dataframe to be returned

ts = pd.DataFrame(
data=curves_bus["subst_id"], index=curves_bus["id"].astype(int)
data=curves_bus["bus_id"], index=curves_bus["id"].astype(int)
)
ts["scenario_name"] = scenario
curves_bus.drop({"id", "subst_id"}, axis=1, inplace=True)
curves_bus.drop({"id", "bus_id"}, axis=1, inplace=True)
ts["p_set"] = curves_bus.values.tolist()

# add subsector to relate to Schmidt's tables afterwards
Expand Down Expand Up @@ -241,7 +241,7 @@ def relate_to_Schmidt_sites(dsm):
# initialize dataframe to be returned

dsm.rename(
columns={"scenario_name": "scn_name", "subst_id": "bus"},
columns={"scenario_name": "scn_name", "bus_id_id": "bus"},
inplace=True,
)

Expand Down

0 comments on commit 23b9e4e

Please sign in to comment.