Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions src/snowflake/snowpark/dataframe.py
Original file line number Diff line number Diff line change
Expand Up @@ -814,6 +814,22 @@ def collect(

See also:
:meth:`collect_nowait()`

The default blocking call retrieves all result rows into client memory.
For large results, consider :meth:`to_local_iterator` instead of
materializing a list. Use :meth:`sort` before collecting when the order
of rows matters.

Example::

>>> df = session.create_dataframe([(2, "Bob"), (1, "Alice")], schema=["id", "name"])
>>> rows = df.sort("id").collect()
>>> rows
[Row(ID=1, NAME='Alice'), Row(ID=2, NAME='Bob')]
>>> rows[0]["NAME"]
'Alice'
>>> rows[1].ID
2
"""

kwargs = {}
Expand Down
Loading