def vat_rate(df, vatID):
    df = df[['vatID', 'deliveryNum', 'compute', 'dur']].dropna()
    df['rate'] = (df.compute / df.dur)
    df = df[(df.vatID == vatID)]
    df = df.set_index('deliveryNum').sort_index()
    return df
def vat_rate(df, vatID):
    df = df[['vatID', 'deliveryNum', 'compute', 'dur']].dropna()
    df['rate'] = (df.compute / df.dur)
    df = df[(df.vatID == vatID)]
    df = df.set_index('deliveryNum').sort_index()
    return df