def verify(df):
    mk_list = (lambda a: (list(a) if isinstance(a, tuple) else [a]))
    (rows, cols) = df.notna().values.nonzero()
    for (i, j) in zip(rows, cols):
        left = sorted(df.iloc[(i, j)].split('.'))
        right = (mk_list(df.index[i]) + mk_list(df.columns[j]))
        right = sorted(list(map(cast, right)))
        assert (left == right)
def verify(df):
    mk_list = (lambda a: (list(a) if isinstance(a, tuple) else [a]))
    (rows, cols) = df.notna().values.nonzero()
    for (i, j) in zip(rows, cols):
        left = sorted(df.iloc[(i, j)].split('.'))
        right = (mk_list(df.index[i]) + mk_list(df.columns[j]))
        right = sorted(list(map(cast, right)))
        assert (left == right)