src/ei_mcoe/ei_mcoe.py
def date_to_year(mcoe_out_df):
    """Convert report_date to report_year for EIA FERC integration.

    This function synchonizes FERC Form 1 and EIA data. FERC
    Form 1 Data only has a column for report year while EIA has the full date;
    having a date column in common is essential when merging the data from both
    sources, therefore we select the less specific version, year, and
    standardize it for both EIA and FERC.

    Args:
        mcoe_out_df (pandas.DataFrame): A DataFrame containing raw EIA data.
        The output of running the pudl_out.mcoe() function.
    Returns:
        pandas.DataFrame: A DataFrame with a column for the report year
            rather than the full date.
    """
    logger.info('Converting date to year')
    year_df = (
        mcoe_out_df.assign(report_year=lambda x: x.report_date.dt.year)
        .drop('report_date', axis=1))
    return year_df
Convert report_date to report_year for EIA FERC integration.

    This function synchonizes FERC Form 1 and EIA data. FERC
    Form 1 Data only has a column for report year while EIA has the full date;
    having a date column in common is essential when merging the data from both
    sources, therefore we select the less specific version, year, and
    standardize it for both EIA and FERC.

    Args:
        mcoe_out_df (pandas.DataFrame): A DataFrame containing raw EIA data.
        The output of running the pudl_out.mcoe() function.
    Returns:
        pandas.DataFrame: A DataFrame with a column for the report year
            rather than the full date.
    
Convert report_date to report_year for EIA FERC integration.
This function synchonizes FERC Form 1 and EIA data. FERC
Form 1 Data only has a column for report year while EIA has the full date;
having a date column in common is essential when merging the data from both
sources, therefore we select the less specific version, year, and
standardize it for both EIA and FERC.


Convert report_date to report_year for EIA FERC integration . This function synchonizes FERC Form 1 and EIA data . FERC Form 1 Data only has a column for report year while EIA has the full date ; having a date column in common is essential when merging the data from both sources therefore we select the less specific version year and standardize it for both EIA and FERC .
def date_to_year(mcoe_out_df):
    logger.info('Converting date to year')
    year_df = (
        mcoe_out_df.assign(report_year=lambda x: x.report_date.dt.year)
        .drop('report_date', axis=1))
    return year_df
def date_to_year ( mcoe_out_df ) : logger . info ( 'Converting date to year' ) year_df = ( mcoe_out_df . assign ( report_year = lambda x : x . report_date . dt . year ) . drop ( 'report_date' , axis = 1 ) ) return year_df
Convert report_date to report_year for EIA FERC integration.
Convert report_date to report_year for EIA FERC integration .
"""Convert report_date to report_year for EIA FERC integration.

    This function synchonizes FERC Form 1 and EIA data. FERC
    Form 1 Data only has a column for report year while EIA has the full date;
    having a date column in common is essential when merging the data from both
    sources, therefore we select the less specific version, year, and
    standardize it for both EIA and FERC.

    Args:
        mcoe_out_df (pandas.DataFrame): A DataFrame containing raw EIA data.
        The output of running the pudl_out.mcoe() function.
    Returns:
        pandas.DataFrame: A DataFrame with a column for the report year
            rather than the full date.
    """
mcoe_out_df