def group_prop(val, grouped_flags, groupxs):
    nRows = len(val)
    new_shape = (nRows, len(groupxs))
    if ((val.dtype == object) or (val.dtype.type == object)):
        new_val = np.full(new_shape, None, dtype=val.dtype)
    elif ut.is_float(val):
        new_val = np.full(new_shape, np.nan, dtype=val.dtype)
    else:
        new_val = np.zeros(new_shape, dtype=val.dtype)
    grouped_vals = vt.apply_grouping(val.T, groupxs)
    _iter = enumerate(zip(grouped_flags, grouped_vals))
    for (new_col, (flags, group)) in _iter:
        (rows, cols) = np.where(flags.T)
        new_val[(rows, new_col)] = group.T[(rows, cols)]
    return new_val
def group_prop(val, grouped_flags, groupxs):
    nRows = len(val)
    new_shape = (nRows, len(groupxs))
    if ((val.dtype == object) or (val.dtype.type == object)):
        new_val = np.full(new_shape, None, dtype=val.dtype)
    elif ut.is_float(val):
        new_val = np.full(new_shape, np.nan, dtype=val.dtype)
    else:
        new_val = np.zeros(new_shape, dtype=val.dtype)
    grouped_vals = vt.apply_grouping(val.T, groupxs)
    _iter = enumerate(zip(grouped_flags, grouped_vals))
    for (new_col, (flags, group)) in _iter:
        (rows, cols) = np.where(flags.T)
        new_val[(rows, new_col)] = group.T[(rows, cols)]
    return new_val