src/ei_mcoe/ei_mcoe.py
def calc_mcoe(df):
    """Calculate mcoe values with NEMS subsitutes.

    Args:
        df (pandas.DataFrame): The DataFrame for which you'd like to calculate
            an mcoe value.

    Returns: pd.Series: A series of calculated mcoe values
    """
    mcoe = float('nan')
    # fix_var_cost = df.fix_var_om
    # Use NEMS column if our calculations are Nan.
    # if np.isnan(df.fix_var_om):
    #    fix_var_cost = ((df.fixed_om_mwh_19_nems * df.capacity_mw)
    #                    +(df.variable_om_mwh_19_nems * df.net_generation_mwh))
    # if df.net_generation_mwh > 0:
    # mcoe = ((df.total_fuel_cost + fix_var_cost) / df.net_generation_mwh)
    if df.fuel_cost_mwh_eia923 is not np.nan or df.fix_var_om is not np.nan:
        mcoe = df.fuel_cost_mwh_eia923 + df.fix_var_om_mwh
    return mcoe
Calculate mcoe values with NEMS subsitutes.

    Args:
        df (pandas.DataFrame): The DataFrame for which you'd like to calculate
            an mcoe value.

    Returns: pd.Series: A series of calculated mcoe values
    
Calculate mcoe values with NEMS subsitutes.
Calculate mcoe values with NEMS subsitutes .
def calc_mcoe(df):
    mcoe = float('nan')
    if df.fuel_cost_mwh_eia923 is not np.nan or df.fix_var_om is not np.nan:
        mcoe = df.fuel_cost_mwh_eia923 + df.fix_var_om_mwh
    return mcoe
def calc_mcoe ( df ) : mcoe = float ( 'nan' ) if df . fuel_cost_mwh_eia923 is not np . nan or df . fix_var_om is not np . nan : mcoe = df . fuel_cost_mwh_eia923 + df . fix_var_om_mwh return mcoe
Calculate mcoe values with NEMS subsitutes.
Calculate mcoe values with NEMS subsitutes .
"""Calculate mcoe values with NEMS subsitutes.

    Args:
        df (pandas.DataFrame): The DataFrame for which you'd like to calculate
            an mcoe value.

    Returns: pd.Series: A series of calculated mcoe values
    """ # fix_var_cost = df.fix_var_om # Use NEMS column if our calculations are Nan. # if np.isnan(df.fix_var_om): #    fix_var_cost = ((df.fixed_om_mwh_19_nems * df.capacity_mw) #                    +(df.variable_om_mwh_19_nems * df.net_generation_mwh)) # if df.net_generation_mwh > 0: # mcoe = ((df.total_fuel_cost + fix_var_cost) / df.net_generation_mwh)
df
The DataFrame for which you'd like to calculate
an mcoe value.
The DataFrame for which you ' d like to calculate an mcoe value .