def gen_WS_DF(df_WS_data):
    """generate DataFrame of weighted sums.

    Parameters
    ----------
    df_WS_data : type
        Description of parameter `df_WS_data`.

    Returns
    -------
    type
        Description of returned object.

    """
    df_fs = gen_FS_DF(df_WS_data)

    list_index = [('mean', 'T2'), ('max', 'T2'), ('min', 'T2'),
                  ('mean', 'U10'), ('max', 'U10'), ('min', 'U10'),
                  ('mean', 'RH2'), ('max', 'RH2'), ('min', 'RH2'),
                  ('mean', 'Kdown')]

    list_const = [getattr(const, attr)
                  for attr in ['T_MEAN', 'T_MAX', 'T_MIN',
                               'WIND_MEAN', 'WIND_MAX', 'WIND_MIN',
                               'RH_MEAN', 'RH_MAX', 'RH_MIN',
                               'SOLAR_RADIATION_GLOBAL']]
    list_ws = [df_fs.loc[idx] * cst
               for idx, cst
               in zip(list_index, list_const)]
    df_ws = pd.concat(list_ws, axis=1).sum(axis=1).unstack().dropna()

    return df_ws
def gen_WS_DF ( df_WS_data ) : df_fs = gen_FS_DF ( df_WS_data ) list_index = [ ( 'mean' , 'T2' ) , ( 'max' , 'T2' ) , ( 'min' , 'T2' ) , ( 'mean' , 'U10' ) , ( 'max' , 'U10' ) , ( 'min' , 'U10' ) , ( 'mean' , 'RH2' ) , ( 'max' , 'RH2' ) , ( 'min' , 'RH2' ) , ( 'mean' , 'Kdown' ) ] list_const = [ getattr ( const , attr ) for attr in [ 'T_MEAN' , 'T_MAX' , 'T_MIN' , 'WIND_MEAN' , 'WIND_MAX' , 'WIND_MIN' , 'RH_MEAN' , 'RH_MAX' , 'RH_MIN' , 'SOLAR_RADIATION_GLOBAL' ] ] list_ws = [ df_fs . loc [ idx ] * cst for idx , cst in zip ( list_index , list_const ) ] df_ws = pd . concat ( list_ws , axis = 1 ) . sum ( axis = 1 ) . unstack ( ) . dropna ( ) return df_ws
generate DataFrame of weighted sums.

    Parameters
    ----------
    df_WS_data : type
        Description of parameter `df_WS_data`.

    Returns
    -------
    type
        Description of returned object.