

def unpack(table, field, newfields=None, include_original=False, missing=None):
    "\n    Unpack data values that are lists or tuples. E.g.::\n\n        >>> import petl as etl\n        >>> table1 = [['foo', 'bar'],\n        ...           [1, ['a', 'b']],\n        ...           [2, ['c', 'd']],\n        ...           [3, ['e', 'f']]]\n        >>> table2 = etl.unpack(table1, 'bar', ['baz', 'quux'])\n        >>> table2\n        +-----+-----+------+\n        | foo | baz | quux |\n        +=====+=====+======+\n        |   1 | 'a' | 'b'  |\n        +-----+-----+------+\n        |   2 | 'c' | 'd'  |\n        +-----+-----+------+\n        |   3 | 'e' | 'f'  |\n        +-----+-----+------+\n\n    This function will attempt to unpack exactly the number of values as\n    given by the number of new fields specified. If there are more values\n    than new fields, remaining values will not be unpacked. If there are less\n    values than new fields, `missing` values will be added.\n\n    See also :func:`petl.transform.unpacks.unpackdict`.\n\n    "
    return UnpackView(table, field, newfields=newfields, include_original=include_original, missing=missing)

dataset/ETHPy150Open alimanfoo/petl/petl/transform/unpacks.py unpack/original