def wake_losses_to_power_curve(power_curve_wind_speeds, power_curve_values,
                               wind_farm_efficiency,
                               wake_losses_model='power_efficiency_curve'):
    r"""
    Reduces the power values of a power curve by an efficiency (curve).

    Parameters
    ----------
    power_curve_wind_speeds : pandas.Series or numpy.array
        Wind speeds in m/s for which the power curve values are provided in
        `power_curve_values`.
    power_curve_values : pandas.Series or numpy.array
        Power curve values corresponding to wind speeds in
        `power_curve_wind_speeds`.
    wind_farm_efficiency : float or pd.DataFrame
        Efficiency of the wind farm. Either constant (float) or efficiency
        curve (pd.DataFrame) containing 'wind_speed' and 'efficiency' columns
        with wind speeds in m/s and the corresponding dimensionless wind farm
        efficiency (reduction of power). Default: None.
    wake_losses_model : String
        Defines the method for taking wake losses within the farm into
        consideration. Options: 'power_efficiency_curve',
        'constant_efficiency'. Default: 'power_efficiency_curve'.

    Returns
    -------
    power_curve_df : pd.DataFrame
        Power curve with power values reduced by a wind farm efficiency.
        DataFrame has 'wind_speed' and 'value' columns with wind speeds in m/s
        and the corresponding power curve value in W.

    """
    # Create power curve DataFrame
    power_curve_df = pd.DataFrame(
        data=[list(power_curve_wind_speeds),
              list(power_curve_values)]).transpose()
    # Rename columns of DataFrame
    power_curve_df.columns = ['wind_speed', 'value']
    if wake_losses_model == 'constant_efficiency':
        if not isinstance(wind_farm_efficiency, float):
            raise TypeError("'wind_farm_efficiency' must be float if " +
                            "`wake_losses_model´ is '{}' but is {}".format(
                                wake_losses_model, wind_farm_efficiency))
        power_curve_df['value'] = power_curve_values * wind_farm_efficiency
    elif wake_losses_model == 'power_efficiency_curve':
        if (not isinstance(wind_farm_efficiency, dict) and
                not isinstance(wind_farm_efficiency, pd.DataFrame)):
            raise TypeError(
                "'wind_farm_efficiency' must be pd.DataFrame if " +
                "`wake_losses_model´ is '{}' but is {}".format(
                    wake_losses_model, wind_farm_efficiency))
        df = pd.concat([power_curve_df.set_index('wind_speed'),
                        wind_farm_efficiency.set_index('wind_speed')], axis=1)
        # Add column with reduced power (nan values of efficiency are
        # interpolated)
        df['reduced_power'] = df['value'] * df['efficiency'].interpolate(
            method='index')
        reduced_power = df['reduced_power'].dropna()
        power_curve_df = pd.DataFrame([reduced_power.index,
                                       reduced_power.values]).transpose()
        power_curve_df.columns = ['wind_speed', 'value']
    else:
        raise ValueError(
            "`wake_losses_model` is {} but should be ".format(
                wake_losses_model) +
            "'constant_efficiency' or 'power_efficiency_curve'")
    return power_curve_df
r"""
    Reduces the power values of a power curve by an efficiency (curve).

    Parameters
    ----------
    power_curve_wind_speeds : pandas.Series or numpy.array
        Wind speeds in m/s for which the power curve values are provided in
        `power_curve_values`.
    power_curve_values : pandas.Series or numpy.array
        Power curve values corresponding to wind speeds in
        `power_curve_wind_speeds`.
    wind_farm_efficiency : float or pd.DataFrame
        Efficiency of the wind farm. Either constant (float) or efficiency
        curve (pd.DataFrame) containing 'wind_speed' and 'efficiency' columns
        with wind speeds in m/s and the corresponding dimensionless wind farm
        efficiency (reduction of power). Default: None.
    wake_losses_model : String
        Defines the method for taking wake losses within the farm into
        consideration. Options: 'power_efficiency_curve',
        'constant_efficiency'. Default: 'power_efficiency_curve'.

    Returns
    -------
    power_curve_df : pd.DataFrame
        Power curve with power values reduced by a wind farm efficiency.
        DataFrame has 'wind_speed' and 'value' columns with wind speeds in m/s
        and the corresponding power curve value in W.