def max_ascent(dive):
    """
    finds the maximum ascent rate

    :param dive: dataframe:
        a dataframe containing columns: time and depth

    :return: float:
        the maximum ascent rate

"""
    max = 0
    # finds maximum positive difference between each time interval
    for i in range(len(dive[1])):
        try:
            temp = dive[1][i+1]
            if (dive[1][i] - temp) > max:
                max = dive[1][i] - temp
        except IndexError:
            pass
    return round(max/10, 3)