flasc.data_processing.dataframe_manipulations.set_ws_by_all_turbines

flasc.data_processing.dataframe_manipulations.set_ws_by_all_turbines#

flasc.data_processing.dataframe_manipulations.set_ws_by_all_turbines(df: DataFrame | FlascDataFrame) DataFrame | FlascDataFrame[source]#

Add ws column by all turbines.

Add a column called 'ws' in your dataframe with value equal to the circular-averaged wind direction measurements of all turbines.

Parameters:
  • df (pd.DataFrame | FlascDataFrame) -- Dataframe with measurements. This dataframe typically consists of wd_%03d, ws_%03d, ti_%03d, pow_%03d, and potentially additional measurements.

  • turbine_numbers ([list, array]) -- List of turbine numbers that should be used to calculate the column average.

Returns:

Dataframe which equals the inserted dataframe

plus the additional column called 'ws'.

Return type:

pd.Dataframe | FlascDataFrame