def effective_rate(df):
    """A simple method to compute the effective rate."""
    if df.shape[0] < 2:
        return None
    rate = df.shape[0] / (df.index[-1] - df.index[0]).total_seconds()
    return rate
