src/ei_mcoe/ei_mcoe.py
def prep_plant_fuel_data_ferc1(pudl_out):
    """Ready FERC Form 1 data for merging with EIA-932 fuel pct breakdown.

    The output DataFrame for this function will be ready to merge with the EIA
    percent breakdowns by plant and fuel type.

    Args:
        raw_ferc1_df (pandas.DataFrame): A DataFrame with raw FERC Form 1 Data.

    Returns:
        pandas.DataFrame: A DataFrame with FERC Form 1 data aggregated by
            plant.
    """
    raw_ferc1_df = pudl_out.plants_steam_ferc1()
    logger.info(' - Building FERC table broken down by plant')
    ferc1_plant_df = (
        raw_ferc1_df.assign(ferc1_unit_count='place_holder')
        .groupby(input_dict['plant_index_cols'], as_index=False)
        .agg({'capex_total': lambda x: x.sum(min_count=1),
              'opex_fuel': lambda x: x.sum(min_count=1),
              'opex_production_total': lambda x: x.sum(min_count=1),
              'ferc1_unit_count': lambda x: x.count(),
              'net_generation_mwh': lambda x: x.sum(min_count=1),
              })
        .assign(opex_nofuel_ferc1=lambda x: (x.opex_production_total -
                                             x.opex_fuel),
                fix_var_om_mwh=lambda x: (
                    x.opex_nofuel_ferc1 / x.net_generation_mwh)
                )
        .rename(
            columns={'capex_total': 'capex_total_ferc1',
                     'opex_fuel': 'opex_fuel_ferc1',
                     'opex_production_total': 'opex_production_total_ferc1'}))
    return ferc1_plant_df
Ready FERC Form 1 data for merging with EIA-932 fuel pct breakdown.

    The output DataFrame for this function will be ready to merge with the EIA
    percent breakdowns by plant and fuel type.

    Args:
        raw_ferc1_df (pandas.DataFrame): A DataFrame with raw FERC Form 1 Data.

    Returns:
        pandas.DataFrame: A DataFrame with FERC Form 1 data aggregated by
            plant.
    
Ready FERC Form 1 data for merging with EIA-932 fuel pct breakdown.
The output DataFrame for this function will be ready to merge with the EIA
percent breakdowns by plant and fuel type.
Ready FERC Form 1 data for merging with EIA - 932 fuel pct breakdown . The output DataFrame for this function will be ready to merge with the EIA percent breakdowns by plant and fuel type .
def prep_plant_fuel_data_ferc1(pudl_out):
    raw_ferc1_df = pudl_out.plants_steam_ferc1()
    logger.info(' - Building FERC table broken down by plant')
    ferc1_plant_df = (
        raw_ferc1_df.assign(ferc1_unit_count='place_holder')
        .groupby(input_dict['plant_index_cols'], as_index=False)
        .agg({'capex_total': lambda x: x.sum(min_count=1),
              'opex_fuel': lambda x: x.sum(min_count=1),
              'opex_production_total': lambda x: x.sum(min_count=1),
              'ferc1_unit_count': lambda x: x.count(),
              'net_generation_mwh': lambda x: x.sum(min_count=1),
              })
        .assign(opex_nofuel_ferc1=lambda x: (x.opex_production_total -
                                             x.opex_fuel),
                fix_var_om_mwh=lambda x: (
                    x.opex_nofuel_ferc1 / x.net_generation_mwh)
                )
        .rename(
            columns={'capex_total': 'capex_total_ferc1',
                     'opex_fuel': 'opex_fuel_ferc1',
                     'opex_production_total': 'opex_production_total_ferc1'}))
    return ferc1_plant_df
def prep_plant_fuel_data_ferc1 ( pudl_out ) : raw_ferc1_df = pudl_out . plants_steam_ferc1 ( ) logger . info ( ' - Building FERC table broken down by plant' ) ferc1_plant_df = ( raw_ferc1_df . assign ( ferc1_unit_count = 'place_holder' ) . groupby ( input_dict [ 'plant_index_cols' ] , as_index = False ) . agg ( { 'capex_total' : lambda x : x . sum ( min_count = 1 ) , 'opex_fuel' : lambda x : x . sum ( min_count = 1 ) , 'opex_production_total' : lambda x : x . sum ( min_count = 1 ) , 'ferc1_unit_count' : lambda x : x . count ( ) , 'net_generation_mwh' : lambda x : x . sum ( min_count = 1 ) , } ) . assign ( opex_nofuel_ferc1 = lambda x : ( x . opex_production_total - x . opex_fuel ) , fix_var_om_mwh = lambda x : ( x . opex_nofuel_ferc1 / x . net_generation_mwh ) ) . rename ( columns = { 'capex_total' : 'capex_total_ferc1' , 'opex_fuel' : 'opex_fuel_ferc1' , 'opex_production_total' : 'opex_production_total_ferc1' } ) ) return ferc1_plant_df
Ready FERC Form 1 data for merging with EIA-932 fuel pct breakdown.
Ready FERC Form 1 data for merging with EIA - 932 fuel pct breakdown .
"""Ready FERC Form 1 data for merging with EIA-932 fuel pct breakdown.

    The output DataFrame for this function will be ready to merge with the EIA
    percent breakdowns by plant and fuel type.

    Args:
        raw_ferc1_df (pandas.DataFrame): A DataFrame with raw FERC Form 1 Data.

    Returns:
        pandas.DataFrame: A DataFrame with FERC Form 1 data aggregated by
            plant.
    """
A DataFrame with FERC Form 1 data aggregated by
plant.
A DataFrame with FERC Form 1 data aggregated by plant .
pandas.DataFrame
pudl_out
raw_ferc1_df
A DataFrame with raw FERC Form 1 Data.
A DataFrame with raw FERC Form 1 Data .