chunked#

geetools.ee_list.ListAccessor.chunked(parts)#

Break a ee.List into lists of length parts.

Parameters:

parts (int | ee.Number) – the number of parts to get.

Returns:

a list of lists.

Return type:

ee.List

Examples

import ee, geetools
from geetools.utils import initialize_documentation

initialize_documentation()

l = ee.List([1,2,3,4,5,6,7,8,9])
l = l.geetools.chunked(3)
l.getInfo()
[[1, 2, 3], [4, 5, 6], [7, 8, 9]]