From 034e0d2312bea868928a8bdf7f1c52279a3a3238 Mon Sep 17 00:00:00 2001 From: Sung Yun <107272191+syun64@users.noreply.github.com> Date: Wed, 12 Jun 2024 23:38:39 +0000 Subject: [PATCH 1/2] docs --- mkdocs/docs/api.md | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/mkdocs/docs/api.md b/mkdocs/docs/api.md index 70b5fd62eb..f1e6243afd 100644 --- a/mkdocs/docs/api.md +++ b/mkdocs/docs/api.md @@ -331,12 +331,25 @@ df = pa.Table.from_pylist( table.append(df) ``` - +You can delete some of the data from the table by calling `tbl.delete()` with a desired `delete_filter`. + +```python +tbl.delete(delete_filter="city == Paris") +``` -!!! example "Under development" - Writing using PyIceberg is still under development. Support for [partial overwrites](https://github.com/apache/iceberg-python/issues/268) and writing to [partitioned tables](https://github.com/apache/iceberg-python/issues/208) is planned and being worked on. +In the above example, any records where the city field value equals to `Paris` will be deleted. +Running `tbl.scan().to_arrow()` will now yield: - +``` +pyarrow.Table +city: string +lat: double +long: double +---- +city: [["Amsterdam","San Francisco","Drachten"],["Groningen"]] +lat: [[52.371807,37.773972,53.11254],[53.21917]] +long: [[4.896029,-122.431297,6.0989],[6.56667]] +``` ## Inspecting tables From 04b9c5937e236472ccabf47890b78f8c28ea0338 Mon Sep 17 00:00:00 2001 From: Sung Yun <107272191+syun64@users.noreply.github.com> Date: Wed, 12 Jun 2024 23:51:14 +0000 Subject: [PATCH 2/2] docs --- mkdocs/docs/api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkdocs/docs/api.md b/mkdocs/docs/api.md index f1e6243afd..06cc6ade54 100644 --- a/mkdocs/docs/api.md +++ b/mkdocs/docs/api.md @@ -334,7 +334,7 @@ table.append(df) You can delete some of the data from the table by calling `tbl.delete()` with a desired `delete_filter`. ```python -tbl.delete(delete_filter="city == Paris") +tbl.delete(delete_filter="city == 'Paris'") ``` In the above example, any records where the city field value equals to `Paris` will be deleted.