Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 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
46 changes: 46 additions & 0 deletions mkdocs/docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -1570,6 +1570,52 @@ print(ray_dataset.take(2))
]
```

### Bodo

PyIceberg interfaces closely with Bodo Dataframes (see [Bodo Iceberg Quick Start](https://docs.bodo.ai/latest/quick_start/quickstart_local_iceberg/)),
which provides a drop-in replacement for Pandas that applies query, compiler and HPC optimizations automatically.
Bodo accelerates and scales Python code from single laptops to large clusters without code rewrites.

<!-- prettier-ignore-start -->

!!! note "Requirements"
This requires [`bodo` to be installed](index.md).

```python
pip install pyiceberg['bodo']
```
<!-- prettier-ignore-end -->

A table can be read easily into a Bodo Dataframe to perform Pandas operations:

```python
df = table.to_bodo() # equivalent to `bodo.pandas.read_iceberg_table(table)`
df = df[df["trip_distance"] >= 10.0]
df = df[["VendorID", "tpep_pickup_datetime", "tpep_dropoff_datetime"]]
print(df)
```

This creates a lazy query, optimizes it, and runs it on all available cores (print triggers execution):

```python
VendorID tpep_pickup_datetime tpep_dropoff_datetime
0 2 2023-01-01 00:27:12 2023-01-01 00:49:56
1 2 2023-01-01 00:09:29 2023-01-01 00:29:23
2 1 2023-01-01 00:13:30 2023-01-01 00:44:00
3 2 2023-01-01 00:41:41 2023-01-01 01:19:32
4 2 2023-01-01 00:22:39 2023-01-01 01:30:45
... ... ... ...
245478 2 2023-01-31 22:32:57 2023-01-31 23:01:48
245479 2 2023-01-31 22:03:26 2023-01-31 22:46:13
245480 2 2023-01-31 23:25:56 2023-02-01 00:05:42
245481 2 2023-01-31 23:18:00 2023-01-31 23:46:00
245482 2 2023-01-31 23:18:00 2023-01-31 23:41:00

[245483 rows x 3 columns]
```

Bodo is optimized to take advantage of Iceberg features such as hidden partitioning and various statistics for efficient reads.

### Daft

PyIceberg interfaces closely with Daft Dataframes (see also: [Daft integration with Iceberg](https://www.getdaft.io/projects/docs/en/stable/integrations/iceberg/)) which provides a full lazily optimized query engine interface on top of PyIceberg tables.
Expand Down
1 change: 1 addition & 0 deletions mkdocs/docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ You can mix and match optional dependencies depending on your needs:
| pandas | Installs both PyArrow and Pandas |
| duckdb | Installs both PyArrow and DuckDB |
| ray | Installs PyArrow, Pandas, and Ray |
| bodo | Installs Bodo |
| daft | Installs Daft |
| polars | Installs Polars |
| s3fs | S3FS as a FileIO implementation to interact with the object store |
Expand Down
Loading
Loading