Skip to content

docs: introduce the DataFrame API in the README - #243

Merged
nielspardon merged 1 commit into
substrait-io:mainfrom
nielspardon:docs/readme-dataframe-api
Jul 29, 2026
Merged

docs: introduce the DataFrame API in the README#243
nielspardon merged 1 commit into
substrait-io:mainfrom
nielspardon:docs/readme-dataframe-api

Conversation

@nielspardon

Copy link
Copy Markdown
Member

What

Adds a Building plans with the DataFrame API section to the README, leading
with the ergonomic substrait.dataframe API (introduced in #204), and reframes
the existing raw substrait.proto / substrait.builders examples as the
low-level API.

Previously the README led straight into verbose raw-proto plan construction,
with no mention of the DataFrame API that already ships on main.

Why a separate PR

These README changes are extracted from the user guide PR (#214) so they can
land independently while that larger guide is being finalized. Everything here
is self-contained against main:

  • The DataFrame snippet is the module's own docstring example and was run
    end to end (it produces a substrait.proto.Plan).
  • The extensions extra referenced for function resolution exists in
    pyproject.toml.

The guide-link paragraph from #214 (pointing at docs/index.md and
pixi run docs-serve) is intentionally omitted here, since those docs and
tasks only exist in #214 — including it now would leave a broken link on main.
#214 re-adds that pointer when the guide lands.

Verification

Ran the new README example against the current API:

import substrait.dataframe as sub

plan = (
    sub.read_named_table("people", {"id": sub.i64, "age": sub.i64, "name": sub.string})
    .filter(sub.col("age") > 25)
    .with_columns(adult=sub.col("age") >= 18)
    .select("id", "name", "adult")
    .to_plan()
)
# -> substrait.proto.Plan

🤖 Generated with AI

Add a "Building plans with the DataFrame API" section leading with the
ergonomic `substrait.dataframe` API, and reframe the existing raw
`substrait.proto`/`substrait.builders` examples as the low-level API.

Extracted from substrait-io#214 so it can land while the full user guide is finalized;
the guide-link paragraph is intentionally omitted until those docs exist.
@nielspardon
nielspardon merged commit 52b7aac into substrait-io:main Jul 29, 2026
21 checks passed
@nielspardon
nielspardon deleted the docs/readme-dataframe-api branch July 29, 2026 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants