Skip to content

Commit 1ff7a31

Browse files
committed
Simplify data frame slicing
1 parent d89d6ff commit 1ff7a31

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

windpowerlib/wind_turbine.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,11 +412,10 @@ def get_turbine_types(print_out=True):
412412
Name: 1, dtype: object
413413
414414
"""
415-
416415
df = load_turbine_data_from_oedb()
417-
cp_curves_df = df.iloc[df.loc[df['has_cp_curve']].index][
416+
cp_curves_df = df.loc[df['has_cp_curve']][
418417
['manufacturer', 'turbine_type', 'has_cp_curve']]
419-
p_curves_df = df.iloc[df.loc[df['has_power_curve']].index][
418+
p_curves_df = df.loc[df['has_power_curve']][
420419
['manufacturer', 'turbine_type', 'has_power_curve']]
421420
curves_df = pd.merge(p_curves_df, cp_curves_df, how='outer',
422421
sort=True).fillna(False)

0 commit comments

Comments
 (0)