Skip to content

Commit

Permalink
docs(python): Fix docs for sink_parquet (#5952)
Browse files Browse the repository at this point in the history
Signed-off-by: Chitral Verma <chitralverma@gmail.com>
  • Loading branch information
chitralverma committed Dec 30, 2022
1 parent 8e40353 commit d11600f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ Miscellaneous
LazyFrame.map
LazyFrame.pipe
LazyFrame.profile
LazyFrame.sink_parquet


Read/write logical plan
Expand Down
14 changes: 11 additions & 3 deletions py-polars/polars/internals/lazyframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -1194,10 +1194,9 @@ def sink_parquet(
slice_pushdown: bool = True,
) -> pli.DataFrame:
"""
Collect into a DataFrame.
Persists a LazyFrame at the provided path.
Note: use :func:`fetch` if you want to run your query on the first `n` rows
only. This can be a huge time saver in debugging queries.
This allows streaming results that are larger than RAM to be written to disk.
Parameters
----------
Expand Down Expand Up @@ -1243,6 +1242,15 @@ def sink_parquet(
slice_pushdown
Slice pushdown optimization.
Returns
-------
DataFrame
Examples
--------
>>> ldf = pl.scan_csv("/path/to/my_larger_than_ram_file.csv") # doctest: +SKIP
>>> ldf.sink_parquet("/tmp/out.parquet") # doctest: +SKIP
"""
if no_optimization:
predicate_pushdown = False
Expand Down

0 comments on commit d11600f

Please sign in to comment.