File tree Expand file tree Collapse file tree 1 file changed +19
-11
lines changed
Expand file tree Collapse file tree 1 file changed +19
-11
lines changed Original file line number Diff line number Diff line change @@ -140,18 +140,26 @@ def smooth_power_curve(
140140 # Append wind speeds to `power_curve_wind_speeds`
141141 maximum_value = power_curve_wind_speeds .iloc [- 1 ] + wind_speed_range
142142 while power_curve_wind_speeds .values [- 1 ] < maximum_value :
143- power_curve_wind_speeds = power_curve_wind_speeds .append (
144- pd .Series (
145- power_curve_wind_speeds .iloc [- 1 ]
146- + (
147- power_curve_wind_speeds .iloc [5 ]
148- - power_curve_wind_speeds .iloc [4 ]
149- ),
150- index = [power_curve_wind_speeds .index [- 1 ] + 1 ],
151- )
143+ power_curve_wind_speeds = pd .concat (
144+ [
145+ power_curve_wind_speeds ,
146+ pd .Series (
147+ power_curve_wind_speeds .iloc [- 1 ]
148+ + (
149+ power_curve_wind_speeds .iloc [5 ]
150+ - power_curve_wind_speeds .iloc [4 ]
151+ ),
152+ index = [power_curve_wind_speeds .index [- 1 ] + 1 ],
153+ )
154+ ],
155+ sort = True ,
152156 )
153- power_curve_values = power_curve_values .append (
154- pd .Series (0.0 , index = [power_curve_values .index [- 1 ] + 1 ])
157+ power_curve_values = pd .concat (
158+ [
159+ power_curve_values ,
160+ pd .Series (0.0 , index = [power_curve_values .index [- 1 ] + 1 ])
161+ ],
162+ sort = True ,
155163 )
156164 for power_curve_wind_speed in power_curve_wind_speeds :
157165 # Create array of wind speeds for the sum
You can’t perform that action at this time.
0 commit comments