def blockdur(df):
    df = df.set_index(['chain', 'blockHeight'])
    df['dur'] = (df.shift((- 1)).blockTime - df.blockTime)
    return df
def blockdur(df):
    df = df.set_index(['chain', 'blockHeight'])
    df['dur'] = (df.shift((- 1)).blockTime - df.blockTime)
    return df