Skip to content

Commit

Permalink
Remove hard coded number
Browse files Browse the repository at this point in the history
  • Loading branch information
SabineHaas committed Sep 4, 2024
1 parent 2775034 commit 345f2dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data_adapter_oemof/build_datapackage.py
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ def reduce_data_frame(data_frame, steps=4):
df = data_frame.copy()
df["ind"] = df.index
df["ind"] = df["ind"].apply(
lambda x: True if x.month == 1 and x.day == 1 and x.hour <= 4 else False
lambda x: True if x.month == 1 and x.day == 1 and x.hour <= steps else False
)
df_reduced = df.loc[df["ind"] == 1].drop(columns=["ind"])
return df_reduced
Expand Down

0 comments on commit 345f2dc

Please sign in to comment.