Skip to content

Commit

Permalink
fix exception when gen_df is empty (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
aclerc authored Oct 16, 2024
1 parent b58aa58 commit 4634105
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions wind_up/plots/scada_funcs_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,8 @@ def plot_ops_curve_timelines_one_wtg(wtg_df: pd.DataFrame, wtg_name: str, title_
]
)
gen_df = dropna_df[dropna_df[DataColumns.active_power_mean] > 0].copy()
if gen_df.empty:
return

for descr, x_var, y_var, x_bin_width in [
("power curve", DataColumns.wind_speed_mean, DataColumns.active_power_mean, 1),
Expand Down

0 comments on commit 4634105

Please sign in to comment.