From b6d15585d06e2f4d308c40a82e492304f0b6cefb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrik=20Sch=C3=B6nfeldt?= Date: Wed, 31 Jul 2024 13:28:45 +0200 Subject: [PATCH] Adhere to Black --- src/demandlib/particular_profiles.py | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/src/demandlib/particular_profiles.py b/src/demandlib/particular_profiles.py index 2c4c262..ebe1801 100644 --- a/src/demandlib/particular_profiles.py +++ b/src/demandlib/particular_profiles.py @@ -72,10 +72,18 @@ def simple_profile(self, annual_demand, **kwargs): weekend_filter = self.dataframe["weekday"].isin(weekend) # Update 'ind' column based on day/night filters and weekday/weekend conditions - self.dataframe.loc[day_filter & week_filter, "ind"] = profile_factors["week"]["day"] - self.dataframe.loc[night_filter & week_filter, "ind"] = profile_factors["week"]["night"] - self.dataframe.loc[day_filter & weekend_filter, "ind"] = profile_factors["weekend"]["day"] - self.dataframe.loc[night_filter & weekend_filter, "ind"] = profile_factors["weekend"]["night"] + self.dataframe.loc[day_filter & week_filter, "ind"] = profile_factors[ + "week" + ]["day"] + self.dataframe.loc[night_filter & week_filter, "ind"] = ( + profile_factors["week"]["night"] + ) + self.dataframe.loc[day_filter & weekend_filter, "ind"] = ( + profile_factors["weekend"]["day"] + ) + self.dataframe.loc[night_filter & weekend_filter, "ind"] = ( + profile_factors["weekend"]["night"] + ) if self.dataframe["ind"].isnull().any(axis=0): logging.error("NAN value found in industrial load profile")