def impact_to_coverage(impact, impact_col_name='Impact'):
    """
    Convert an impact DataFrame to a coverage DataFrame

    The returned coverage DataFrame can be used for input to a
    :py:class:`CoverageFormulation<chama.optimization.CoverageFormulation>`.

    Parameters
    ----------
    impact : pandas DataFrame
        DataFrame containing three columns. 'Scenario' is the name of the 
        scenarios, 'Sensor' is the name of the sensors, and a third column 
        (called impact_col_name) contains an impact value.
    impact_col_name : str
        The name of the column containing the impact data (default = 'Impact')

    Returns
    -------
    coverage : pandas DataFrame
        DataFrame with columns 'Sensor' and 'Coverage' to be used as input
        to a coverage-based sensor placement solver.

    """
    coverage = impact.copy()
    coverage.drop(impact_col_name, axis=1, inplace=True)
    coverage = coverage.groupby('Sensor')['Scenario'].unique()
    coverage = coverage.reset_index()
    coverage.rename(columns={'Scenario': 'Coverage'}, inplace=True)
    return coverage
