Skip to content

Show coerceable Python types as dataframes when returned from .| expressions#2046

Merged
rolandwalker merged 1 commit into
mainfrom
RW/display-coerceable-python-types-as-dataframes
Jul 24, 2026
Merged

Show coerceable Python types as dataframes when returned from .| expressions#2046
rolandwalker merged 1 commit into
mainfrom
RW/display-coerceable-python-types-as-dataframes

Conversation

@rolandwalker

Copy link
Copy Markdown
Contributor

Description

Dictionaries display as tables with the keys identifying the columns. Scalars display exactly like executing SELECT 1; in plain SQL. Lists are coerced into a Polars Series.

In a change, Nones are not attempted to be displayed at all, not even sending a warning in the SQLResult status property. This is for the case that the .| Python expression was used for a side effect.

Checklist

  • I added this contribution to the changelog.md file.
  • I added my name to the AUTHORS file (or it's already there).
  • To lint and format the code, I ran
    uv run ruff check && uv run ruff format && uv run mypy --install-types .

expressions.

Dictionaries display as tables with the keys identifying the columns.
Scalars display exactly like executing "SELECT 1;" in plain SQL.  Lists
are coerced into a Polars Series.

In a change, Nones are not attempted to be displayed at all, not even
sending a warning in the SQLResult status property.  This is for the
case that the .| Python expression was used for a side effect.
@rolandwalker rolandwalker self-assigned this Jul 24, 2026
@rolandwalker rolandwalker changed the title Show coerceable Python types as dataframes Show coerceable Python types as dataframes when returned from .| expressions Jul 24, 2026
@rolandwalker
rolandwalker merged commit 697d396 into main Jul 24, 2026
11 checks passed
@rolandwalker
rolandwalker deleted the RW/display-coerceable-python-types-as-dataframes branch July 24, 2026 20:00
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.

1 participant