Skip to content

Commit

Permalink
docs(python): Add example showing use of write_delta with `delta_la…
Browse files Browse the repository at this point in the history
…ke.WriterProperties` (#20746)
  • Loading branch information
lmmx authored Feb 1, 2025
1 parent b3ce116 commit 3130dd0
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions py-polars/polars/dataframe/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -4447,6 +4447,21 @@ def write_delta(
... },
... ) # doctest: +SKIP
Write DataFrame as a Delta Lake table with zstd compression.
For all `delta_write_options` keyword arguments, check the deltalake docs
`here
<https://delta-io.github.io/delta-rs/api/delta_writer/#deltalake.write_deltalake>`__,
and for Writer Properties in particular `here
<https://delta-io.github.io/delta-rs/api/delta_writer/#deltalake.WriterProperties>`__.
>>> import deltalake
>>> df.write_delta(
... table_path,
... delta_write_options={
... "writer_properties": deltalake.WriterProperties(compression="zstd"),
... },
... ) # doctest: +SKIP
Merge the DataFrame with an existing Delta Lake table.
For all `TableMerger` methods, check the deltalake docs
`here <https://delta-io.github.io/delta-rs/api/delta_table/delta_table_merger/>`__.
Expand Down

0 comments on commit 3130dd0

Please sign in to comment.