'Expand a data frame row into a list of rows for list:type values
@param row: the row
@param field: the field to expand (None for all fields)
@param axisfilter: dict of filtered field values by column names'

def _expand(self, row, axisfilter=None):

    pairs = []
    append = pairs.append
    for colname in self.gfields.values():
        if (not colname):
            continue
        value = row[colname]
        if (type(value) is list):
            if (not value):
                value = [None]
            if (axisfilter and (colname in axisfilter)):
                p = [(colname, v) for v in value if (v in axisfilter[colname])]
                if (not p):
                    raise RuntimeError('record    does    not    match    query')
                else:
                    append(p)
            else:
                append([(colname, v) for v in value])
        else:
            append([(colname, value)])
    result = [dict(i) for i in product(*pairs)]
    return result
