def Ogive(df, no_nan=True):
    """
    Integrates the Ogive from Coespectra

    Parameters
    -----------
    df: dataframe
        cospectrum to be integrated
    """
    import scipy as sp
    import numpy as np
    import pandas as pd
    if no_nan:
        x = np.array(df.index)
        out = pd.DataFrame(index=x)
        for c in df.columns:
            y = np.array(df[c])
            og = sp.integrate.cumtrapz(y[::-1], x=x[::-1], initial=0)
            out.loc[:, (c)] = -og[::-1]
    else:
        dfs = []
        for c in df.columns:
            ser = df[c].dropna()
            x = np.array(ser.index)
            y = np.array(ser)
            og = sp.integrate.cumtrapz(y[::-1], x=x[::-1], initial=0)
            dfs.append(pd.DataFrame(data=-og[::-1], columns=[c], index=x))
        for d in dfs[1:]:
            dfs[0] = dfs[0].join(d, how='outer')
        out = dfs[0]
    out.index.name = df.index.name
    return out
