turicreate.SArray.dict_values

SArray.dict_values()

Create an SArray that contains all the values from each dictionary element as a list. Fails on SArrays whose data type is not dict.

Returns:
out : SArray

A SArray of list type, where each element is a list of values from the input SArray element.

See also

dict_keys

Examples

>>> sa = turicreate.SArray([{"this":1, "is":5, "dog":7},
                         {"this": 2, "are": 1, "cat": 5}])
>>> sa.dict_values()
dtype: list
Rows: 2
[[1, 5, 7], [2, 1, 5]]