src/ei_mcoe/ei_mcoe.py
def clean_part1_output(part1_df, drop_calcs=False):
    """Clean output for Part 1: round, drop calcs if desired.

    Args:
        part1_df (pandas.DataFrame): The result of running build_part1_output()
        drop_calcs: A boolean to indicate whether you'd like all of the
            calculations or just the index data.

    Returns:
        pandas.DataFrame: A DataFrame that either reflects the plant level
            or unit level EIA data separated by fuel type.
    """
    logger.info('Cleaning Part 1 Output')
    out_df = part1_df  # .round(2)
    # Just keep the generic plant data if you want
    if 'unit_id_pudl' in out_df.columns.tolist():
        level = 'unit-fuel'
    else:
        level = 'plant-fuel'
    if drop_calcs is True:
        out_df = out_df[input_dict[level + '_index_cols'] +
                        input_dict['merge_cols_qual']]
    logger.info('Finished cleaning Part 1 data')
    return out_df
Clean output for Part 1: round, drop calcs if desired.

    Args:
        part1_df (pandas.DataFrame): The result of running build_part1_output()
        drop_calcs: A boolean to indicate whether you'd like all of the
            calculations or just the index data.

    Returns:
        pandas.DataFrame: A DataFrame that either reflects the plant level
            or unit level EIA data separated by fuel type.
    
Clean output for Part 1: round, drop calcs if desired.
Clean output for Part 1 : round drop calcs if desired .
def clean_part1_output(part1_df, drop_calcs=False):
    logger.info('Cleaning Part 1 Output')
    out_df = part1_df  
    if 'unit_id_pudl' in out_df.columns.tolist():
        level = 'unit-fuel'
    else:
        level = 'plant-fuel'
    if drop_calcs is True:
        out_df = out_df[input_dict[level + '_index_cols'] +
                        input_dict['merge_cols_qual']]
    logger.info('Finished cleaning Part 1 data')
    return out_df
def clean_part1_output ( part1_df , drop_calcs = False ) : logger . info ( 'Cleaning Part 1 Output' ) out_df = part1_df if 'unit_id_pudl' in out_df . columns . tolist ( ) : level = 'unit-fuel' else : level = 'plant-fuel' if drop_calcs is True : out_df = out_df [ input_dict [ level + '_index_cols' ] + input_dict [ 'merge_cols_qual' ] ] logger . info ( 'Finished cleaning Part 1 data' ) return out_df
Clean output for Part 1: round, drop calcs if desired.
Clean output for Part 1 : round drop calcs if desired .
"""Clean output for Part 1: round, drop calcs if desired.

    Args:
        part1_df (pandas.DataFrame): The result of running build_part1_output()
        drop_calcs: A boolean to indicate whether you'd like all of the
            calculations or just the index data.

    Returns:
        pandas.DataFrame: A DataFrame that either reflects the plant level
            or unit level EIA data separated by fuel type.
    """ # .round(2) # Just keep the generic plant data if you want
A DataFrame that either reflects the plant level
or unit level EIA data separated by fuel type.
A DataFrame that either reflects the plant level or unit level EIA data separated by fuel type .
pandas.DataFrame
part1_df
The result of running build_part1_output()
The result of running build_part1_output ()
drop_calcs
A boolean to indicate whether you'd like all of the
calculations or just the index data.
A boolean to indicate whether you ' d like all of the calculations or just the index data .