src/ei_mcoe/ei_mcoe.py
def add_var_cost_col(raw_eia_all_plants_df):
    """Add variable cost column adjusted for inflation."""
    raw_eia_all_plants_df['greet_tech'] = (
        raw_eia_all_plants_df['technology_description']
        .map(tech_rename_greet)
        .replace(np.nan, None))
    raw_eia_all_plants_df['variable_om_mwh'] = (
        raw_eia_all_plants_df.apply(
            lambda x: make_var_cost_multiplier_key(
                x.capacity_mw, x.greet_tech, x.fuel_type_code_pudl), axis=1)
        .map(nems_var_cost_multipliers))
    var_cost_df = (
        raw_eia_all_plants_df.assign(
            variable_cost=lambda x: (x.variable_om_mwh
                                     * x.net_generation_mwh),
        )
    )
    # Account for inflation - calculate nominal price for each year
    var_cost_with_inflation_df = (
        calc_inflation('fred', 2017, var_cost_df, 'variable_cost'))
    return var_cost_with_inflation_df
Add variable cost column adjusted for inflation.
Add variable cost column adjusted for inflation.
Add variable cost column adjusted for inflation .
def add_var_cost_col(raw_eia_all_plants_df):
    raw_eia_all_plants_df['greet_tech'] = (
        raw_eia_all_plants_df['technology_description']
        .map(tech_rename_greet)
        .replace(np.nan, None))
    raw_eia_all_plants_df['variable_om_mwh'] = (
        raw_eia_all_plants_df.apply(
            lambda x: make_var_cost_multiplier_key(
                x.capacity_mw, x.greet_tech, x.fuel_type_code_pudl), axis=1)
        .map(nems_var_cost_multipliers))
    var_cost_df = (
        raw_eia_all_plants_df.assign(
            variable_cost=lambda x: (x.variable_om_mwh
                                     * x.net_generation_mwh),
        )
    )
    var_cost_with_inflation_df = (
        calc_inflation('fred', 2017, var_cost_df, 'variable_cost'))
    return var_cost_with_inflation_df
def add_var_cost_col ( raw_eia_all_plants_df ) : raw_eia_all_plants_df [ 'greet_tech' ] = ( raw_eia_all_plants_df [ 'technology_description' ] . map ( tech_rename_greet ) . replace ( np . nan , None ) ) raw_eia_all_plants_df [ 'variable_om_mwh' ] = ( raw_eia_all_plants_df . apply ( lambda x : make_var_cost_multiplier_key ( x . capacity_mw , x . greet_tech , x . fuel_type_code_pudl ) , axis = 1 ) . map ( nems_var_cost_multipliers ) ) var_cost_df = ( raw_eia_all_plants_df . assign ( variable_cost = lambda x : ( x . variable_om_mwh * x . net_generation_mwh ) , ) ) var_cost_with_inflation_df = ( calc_inflation ( 'fred' , 2017 , var_cost_df , 'variable_cost' ) ) return var_cost_with_inflation_df
Add variable cost column adjusted for inflation.
Add variable cost column adjusted for inflation .
"""Add variable cost column adjusted for inflation.""" # Account for inflation - calculate nominal price for each year
raw_eia_all_plants_df