Skip to content

Add runnable examples to CTable where and sort_by - #711

Open
armutlutost wants to merge 1 commit into
Blosc:mainfrom
armutlutost:docs/650-ctable-query-examples
Open

armutlutost wants to merge 1 commit into
Blosc:mainfrom
armutlutost:docs/650-ctable-query-examples

Conversation

@armutlutost

Copy link
Copy Markdown

Summary

Add runnable examples to the CTable.where() and CTable.sort_by() docstrings.

The examples demonstrate filtering, column projection, compound predicates, plain sorting, lazy sorting of a filtered view, and multi-key sorting.

Closes #650

Changes

  • Add a complete sample CTable setup to both docstrings.
  • Demonstrate where() with a simple predicate and selected columns.
  • Demonstrate a compound column predicate.
  • Demonstrate materialized and lazy sorting.
  • Add a multi-key sorting example.
  • Include printed results that clarify lazy view behavior.

Validation

  • python -m py_compile src/blosc2/ctable.py
  • git diff --check

The repository’s required blosc2 Conda environment was unavailable locally, so the documentation examples were not executed against the compiled extension.

AI disclosure

AI assistance was used to draft the documentation examples. I reviewed the changes before submitting this pull request.

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.

Add runnable code snippets to CTable.where() and sort_by() docstrings

1 participant