chunk
chunk(
self ,
df: DataFrame ,
)-> ‘tuple[pd.DataFrame, pd.DataFrame]’
Chunk a dataframe into new contiguous segments.
The dataframe must have column names {key}_max, {key}_min, and {key}_step where {key} is the key used in the kwargs.
Parameters
Parameter | Description |
---|---|
df | Input dataframe to chunk. |
Returns
A tuple of the original dataframe with added column ’_group’ and an output dataframe with column ’_group’. The _group column is used to link the two dataframes together.