src/ei_mcoe/ei_mcoe.py
def calc_cap_op_by_fuel_ferc1(ferc1_pct_prep_df):
    """Calculate FERC Form 1 cost breakdowns from EIA-923 fuel percentages.

    A helper function for specific use within the merge_ferc_with_eia_pcts()
    function. Once the the outputs of eia_fuel_pcts() and prep_plant_data_
    ferc1() are merged, this function multiplies the EIA fuel pct
    columns by the FERC From 1 values, so calculating the equivalent FERC cost
    breakdown by fuel. Capex is based on capacity and opex is based on net
    generation.

    Args:
        ferc1_pct_df (pandas.DataFrame): A DataFrame with raw ferc plant
            values merged with eia percents.

    Returns:
        pandas.DataFrame: A DataFrame with FERC Form 1 Data disaggregated
            by plant and fuel type based on EIA percent values.

    """
    logger.info(' -- Building FERC table broken down by plant and fuel type')
    # Did not use .assign here because need to integrate local variables.
    for fuel in fuel_types:
        ferc1_pct_prep_df['capex_' + fuel] = (
            ferc1_pct_prep_df['capex_total_ferc1'] *
            ferc1_pct_prep_df['pct_capacity_mw_' + fuel])
        ferc1_pct_prep_df['opex_nofuel_' + fuel] = (
            ferc1_pct_prep_df['opex_nofuel_ferc1'] *
            ferc1_pct_prep_df['pct_net_generation_mwh_' + fuel])
        ferc1_pct_prep_df['net_generation_mwh_' + fuel] = (
            ferc1_pct_prep_df['net_generation_mwh'] *
            ferc1_pct_prep_df['pct_net_generation_mwh_' + fuel])
    ferc1_plant_fuel_df = ferc1_pct_prep_df
    return ferc1_plant_fuel_df
Calculate FERC Form 1 cost breakdowns from EIA-923 fuel percentages.

    A helper function for specific use within the merge_ferc_with_eia_pcts()
    function. Once the the outputs of eia_fuel_pcts() and prep_plant_data_
    ferc1() are merged, this function multiplies the EIA fuel pct
    columns by the FERC From 1 values, so calculating the equivalent FERC cost
    breakdown by fuel. Capex is based on capacity and opex is based on net
    generation.

    Args:
        ferc1_pct_df (pandas.DataFrame): A DataFrame with raw ferc plant
            values merged with eia percents.

    Returns:
        pandas.DataFrame: A DataFrame with FERC Form 1 Data disaggregated
            by plant and fuel type based on EIA percent values.

    
Calculate FERC Form 1 cost breakdowns from EIA-923 fuel percentages.
A helper function for specific use within the merge_ferc_with_eia_pcts()
function. Once the the outputs of eia_fuel_pcts() and prep_plant_data_
ferc1() are merged, this function multiplies the EIA fuel pct
columns by the FERC From 1 values, so calculating the equivalent FERC cost
breakdown by fuel. Capex is based on capacity and opex is based on net
generation.
Calculate FERC Form 1 cost breakdowns from EIA - 923 fuel percentages . A helper function for specific use within the merge_ferc_with_eia_pcts () function . Once the the outputs of eia_fuel_pcts () and prep_plant_data_ ferc1 () are merged this function multiplies the EIA fuel pct columns by the FERC From 1 values so calculating the equivalent FERC cost breakdown by fuel . Capex is based on capacity and opex is based on net generation .
def calc_cap_op_by_fuel_ferc1(ferc1_pct_prep_df):
    logger.info(' -- Building FERC table broken down by plant and fuel type')
    for fuel in fuel_types:
        ferc1_pct_prep_df['capex_' + fuel] = (
            ferc1_pct_prep_df['capex_total_ferc1'] *
            ferc1_pct_prep_df['pct_capacity_mw_' + fuel])
        ferc1_pct_prep_df['opex_nofuel_' + fuel] = (
            ferc1_pct_prep_df['opex_nofuel_ferc1'] *
            ferc1_pct_prep_df['pct_net_generation_mwh_' + fuel])
        ferc1_pct_prep_df['net_generation_mwh_' + fuel] = (
            ferc1_pct_prep_df['net_generation_mwh'] *
            ferc1_pct_prep_df['pct_net_generation_mwh_' + fuel])
    ferc1_plant_fuel_df = ferc1_pct_prep_df
    return ferc1_plant_fuel_df
def calc_cap_op_by_fuel_ferc1 ( ferc1_pct_prep_df ) : logger . info ( ' -- Building FERC table broken down by plant and fuel type' ) for fuel in fuel_types : ferc1_pct_prep_df [ 'capex_' + fuel ] = ( ferc1_pct_prep_df [ 'capex_total_ferc1' ] * ferc1_pct_prep_df [ 'pct_capacity_mw_' + fuel ] ) ferc1_pct_prep_df [ 'opex_nofuel_' + fuel ] = ( ferc1_pct_prep_df [ 'opex_nofuel_ferc1' ] * ferc1_pct_prep_df [ 'pct_net_generation_mwh_' + fuel ] ) ferc1_pct_prep_df [ 'net_generation_mwh_' + fuel ] = ( ferc1_pct_prep_df [ 'net_generation_mwh' ] * ferc1_pct_prep_df [ 'pct_net_generation_mwh_' + fuel ] ) ferc1_plant_fuel_df = ferc1_pct_prep_df return ferc1_plant_fuel_df
Calculate FERC Form 1 cost breakdowns from EIA-923 fuel percentages.
Calculate FERC Form 1 cost breakdowns from EIA - 923 fuel percentages .
"""Calculate FERC Form 1 cost breakdowns from EIA-923 fuel percentages.

    A helper function for specific use within the merge_ferc_with_eia_pcts()
    function. Once the the outputs of eia_fuel_pcts() and prep_plant_data_
    ferc1() are merged, this function multiplies the EIA fuel pct
    columns by the FERC From 1 values, so calculating the equivalent FERC cost
    breakdown by fuel. Capex is based on capacity and opex is based on net
    generation.

    Args:
        ferc1_pct_df (pandas.DataFrame): A DataFrame with raw ferc plant
            values merged with eia percents.

    Returns:
        pandas.DataFrame: A DataFrame with FERC Form 1 Data disaggregated
            by plant and fuel type based on EIA percent values.

    """ # Did not use .assign here because need to integrate local variables.
A DataFrame with FERC Form 1 Data disaggregated
by plant and fuel type based on EIA percent values.
A DataFrame with FERC Form 1 Data disaggregated by plant and fuel type based on EIA percent values .
pandas.DataFrame
ferc1_pct_prep_df
ferc1_pct_df
A DataFrame with raw ferc plant
values merged with eia percents.
A DataFrame with raw ferc plant values merged with eia percents .