towhee.dataframe.iterators.BatchIterator¶
- class towhee.dataframe.iterators.BatchIterator(df: DataFrame, batch_size: int = 1, step: int = 1, block: bool = True)[source]¶
Bases:
MapIterator
A row-based batched map DataFrame iterator.
- Parameters:
df (towhee.Dataframe) – The dataframe that is being iterated.
batch_size (int) – How many values to read.
step (int) – How many steps to take after each read.
block (bool) – Whether to block when data not present.
Methods
Remove unblock and remove iterator.
Attributes
Returns current accessible data size.
Returns the current index.
Returns the df name.
id
- property accessible_size: int¶
Returns current accessible data size.
- property current_index: int¶
Returns the current index.
- property df_name: str¶
Returns the df name.
- notify()¶
Remove unblock and remove iterator.