Skip to content

Commit fabe1e2

Browse files
committed
Sort turbine data (alphabetic order)
1 parent 1190788 commit fabe1e2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

windpowerlib/data.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,7 @@ def store_turbine_data_from_oedb(
224224
if curve_type == "power_curve":
225225
curves_df *= 1000
226226
curves_df.index.name = "turbine_type"
227+
curves_df.sort_index(inplace=True)
227228
curves_df.to_csv(filename.format("{}s".format(curve_type)))
228229

229230
# get turbine data and save to file (excl. curves)
@@ -240,6 +241,7 @@ def store_turbine_data_from_oedb(
240241
).set_index("turbine_type")
241242
# nominal power in W
242243
turbine_data_df["nominal_power"] *= 1000
244+
turbine_data_df.sort_index(inplace=True)
243245
turbine_data_df.to_csv(filename.format("turbine_data"))
244246
check_turbine_data(filename)
245247
return turbine_data

0 commit comments

Comments
 (0)