def mortality(cases, deaths, dates=None):
    """Calculates the mortality rate on a specified list dates.

    If no dates are provided, the mortality is calculated on every date.
    Note that the time scope of forecasts for cases and deaths must match.

    Parameters
    ----------
    cases : DataFrame
        A DataFrame of datetime indexed cases.
    deaths : DataFrame
        A DataFrame of datetime indexed deaths.
    dates : list
        A list of dates 'YYYY-MM-DD'.

    Returns
    -------
    mortality : Dataframe
        A Dataframe with the mortality on all or the specified dates.
    """
    if dates == None:   
        dates = cases.index
    mortality = deaths.loc[dates]/cases.loc[dates]*100
    return mortality