import logging


def split_dataframe_by_column(df, column):
    """
        Purpose:
            Split dataframe into multipel dataframes based on uniqueness
            of columns passed in. The dataframe is then split into smaller
            dataframes, one for each value of the variable.
        Args:
            df (Pandas DataFrame): DataFrame to split
            column (string): string of the column name to split on
        Return
            split_df (Dict of Pandas DataFrames): Dictionary with the
                split dataframes and the value that the column maps to
                e.g false/true/0/1
    """
    logging.info('Spliting Dataframes on Column')
    logging.info(
        'Columns to Split on: {column}'.format(column=column)
    )

    column_values = df[column].unique()

    split_df = {}
    for column_value in column_values:
        split_df[str(column_value)] = df[df[column] == column_value]

    return split_df