Skip to content

Commit

Permalink
Merge pull request #872 from Tomkourou/master
Browse files Browse the repository at this point in the history
♻️ address pandas FutureWarning
  • Loading branch information
fneum authored Jan 17, 2024
2 parents 5faab62 + aaa587d commit c010f14
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scripts/build_electricity_production.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
gen = client.query_generation(country, start=start, end=end, nett=True)
gen = gen.tz_localize(None).resample("1h").mean()
gen = gen.loc[start.tz_localize(None) : end.tz_localize(None)]
gen = gen.rename(columns=carrier_grouper).groupby(level=0, axis=1).sum()
gen = gen.rename(columns=carrier_grouper).T.groupby(level=0).sum().T
generation.append(gen)
except NoMatchingDataError:
unavailable_countries.append(country)
Expand Down
10 changes: 5 additions & 5 deletions scripts/build_transport_demand.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
import numpy as np
import pandas as pd
import xarray as xr

from _helpers import configure_logging
from _helpers import generate_periodic_profiles
from _helpers import configure_logging, generate_periodic_profiles

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -137,8 +135,10 @@ def bev_availability_profile(fn, snapshots, nodes, options):
)

if not avail[avail < 0].empty:
logger.warning("The BEV availability weekly profile has negative values which can "
"lead to infeasibility.")
logger.warning(
"The BEV availability weekly profile has negative values which can "
"lead to infeasibility."
)

return generate_periodic_profiles(
dt_index=snapshots,
Expand Down

0 comments on commit c010f14

Please sign in to comment.