From 3a6ed88234de39cbee6cc7fb4e5c16d3b2ffecf9 Mon Sep 17 00:00:00 2001 From: birgits Date: Thu, 1 Feb 2024 10:20:25 -0800 Subject: [PATCH] Fix failing docstring test for NaN values in "has_cp_curve" --- windpowerlib/data.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windpowerlib/data.py b/windpowerlib/data.py index 9d9cc1f..718e4ee 100644 --- a/windpowerlib/data.py +++ b/windpowerlib/data.py @@ -92,10 +92,10 @@ def get_turbine_types(turbine_library="local", print_out=True, filter_=True): + "but must be 'local' or 'oedb'." ) if filter_: - cp_curves_df = df.loc[df["has_cp_curve"]][ + cp_curves_df = df.loc[df["has_cp_curve"].fillna(False)][ ["manufacturer", "turbine_type", "has_cp_curve"] ] - p_curves_df = df.loc[df["has_power_curve"]][ + p_curves_df = df.loc[df["has_power_curve"].fillna(False)][ ["manufacturer", "turbine_type", "has_power_curve"] ] curves_df = pd.merge(