chunked
Splits a DataFrame into consecutive sub-dataframes (chunks) and returns them as a FrameColumn. Chunks are formed in order and do not overlap.
Each chunk contains at most the specified number of rows. The resulting FrameColumn ’s name can be customized; by default, it is "groups."
DataFrame can be split into chunks in two ways:
By fixed size: split into chunks of up to the given size.
By start indices: split using custom zero-based start indices for each chunk; each chunk ends right before the next start index or the end of the DataFrame.
If called on a DataColumn, groups consecutive values of this column into lists of at most the given size and returns them as a ValueColumn of lists.
If called on a ColumnGroup (or on a DataColumn of rows), splits it into a FrameColumn of sub-dataframes with at most the given number of rows in each chunk. The resulting FrameColumn inherits the name of the group (or the column of rows).
Examples
Fixed size chunks:
Custom start indices: