def check_lad19cd_format(df):
    df = df.reset_index()
    split_code = df['lad19cd'].apply((lambda x: re.split('(\\d+)', x)))
    if (not split_code.apply((lambda x: (((len(x[0]) == 1) & (x[0] in 'ENSW')) & (len(x[1]) == 8)))).all()):
        raise ValueError('Invalid lad19cd format')
    return True
def check_lad19cd_format(df):
    df = df.reset_index()
    split_code = df['lad19cd'].apply((lambda x: re.split('(\\d+)', x)))
    if (not split_code.apply((lambda x: (((len(x[0]) == 1) & (x[0] in 'ENSW')) & (len(x[1]) == 8)))).all()):
        raise ValueError('Invalid lad19cd format')
    return True