Ctrl+K
Logo image Logo image

Site Navigation

  • API Reference
  • Examples

Site Navigation

  • API Reference
  • Examples

Section Navigation

  • PyFlink DataFrame
    • DataFrame
    • DataFrame Creation
    • Input / Output
    • SQL
    • Data Types
    • User Defined Functions
    • Configuration
    • Catalog
    • GPU Support
    • AI / LLM
    • Multimodal Expressions
  • PyFlink Multimodal
  • PyFlink Table
  • PyFlink DataStream
  • PyFlink Common

pyflink.dataframe.DataFrame.iter_rows#

DataFrame.iter_rows(*, include_row_kind: bool = False, row_kind_field: str = '__row_kind__') → Iterator[Dict[str, Any]][source]#

Return an iterator over rows of the DataFrame.

This is a terminal operation that triggers execution.

Parameters
  • include_row_kind – If True, include the Flink changelog row kind in each row dictionary.

  • row_kind_field – Field name for row kind when include_row_kind is True.

Returns

A closeable iterator that yields rows as dictionaries.

Example::
>>> df = pf.from_records([(1, "a"), (2, "b")], schema=["id", "name"])
>>> for row in df.iter_rows():
...     print(row)
{'id': 1, 'name': 'a'}
{'id': 2, 'name': 'b'}

previous

pyflink.dataframe.DataFrame.head

next

pyflink.dataframe.DataFrame.iter_batches

Show Source

Created using Sphinx 4.5.0.