Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on May 7, 2026. It is now read-only.

feat: add display.render_mode to control DataFrame/Series visualization#2413

Merged
shuoweil merged 19 commits into
maingoogleapis/python-bigquery-dataframes:mainfrom
shuowei-anywidget-cell-visualgoogleapis/python-bigquery-dataframes:shuowei-anywidget-cell-visualCopy head branch name to clipboard
Feb 26, 2026
Merged

feat: add display.render_mode to control DataFrame/Series visualization#2413
shuoweil merged 19 commits into
maingoogleapis/python-bigquery-dataframes:mainfrom
shuowei-anywidget-cell-visualgoogleapis/python-bigquery-dataframes:shuowei-anywidget-cell-visualCopy head branch name to clipboard

Conversation

@shuoweil

@shuoweil shuoweil commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

This PR introduces the display.render_mode configuration option, providing a clearer and more flexible way to control how BigFrames objects are visualized in notebooks and other interactive environments.

Key Changes:

  • New Configuration Option: Added bpd.options.display.render_mode which supports three modes:
    • html (Default): Standard HTML table rendering.
    • plaintext: Forces plain text output by removing the HTML component from the mimebundle.
    • anywidget: Enables the interactive anywidget-based table component.
  • Migration Path: Maintained backward compatibility for display.repr_mode = "anywidget". The rendering logic now checks both the new render_mode and the legacy repr_mode flags.
  • Notebook & Test Updates: Updated existing notebooks and system tests to prefer the new render_mode option while verifying that existing behaviors remain intact.
  • New Unit Tests: Added tests/unit/display/test_render_mode.py to specifically verify the mimebundle selection logic and priority across different configuration states.

While repr_mode was previously used to toggle the interactive widget, "representation mode" is a broad term. render_mode specifically addresses the format of the output (HTML vs. Text vs. Widget), allowing for better support for text-only environments and a more intuitive API for users.

Also verified at colab notebook: screen/AHNz4o5Mhb9UHrh

Fixes #<479282023> 🦕

@shuoweil shuoweil self-assigned this Jan 28, 2026
@shuoweil shuoweil requested review from a team January 28, 2026 22:59
@review-notebook-app

Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@product-auto-label product-auto-label Bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Jan 28, 2026
@shuoweil shuoweil marked this pull request as draft January 29, 2026 00:20
@shuoweil shuoweil marked this pull request as ready for review January 30, 2026 00:26
@product-auto-label product-auto-label Bot added size: l Pull request size is large. and removed size: m Pull request size is medium. labels Jan 30, 2026
@shuoweil shuoweil marked this pull request as draft February 2, 2026 21:00
@shuoweil shuoweil force-pushed the shuowei-anywidget-cell-visual branch from c20f0ae to 60359f8 Compare February 21, 2026 00:14
@shuoweil shuoweil removed the request for review from a team February 21, 2026 00:26
@shuoweil shuoweil changed the title feat: Add display.render_mode option to control DataFrame visualization feat: add display.render_mode to control DataFrame/Series visualization Feb 21, 2026
@shuoweil shuoweil marked this pull request as ready for review February 21, 2026 00:28
@shuoweil shuoweil requested a review from a team as a code owner February 21, 2026 00:28
@shuoweil

Copy link
Copy Markdown
Contributor Author

Upon checking, the failed tests are unrelated to our change.

@shuoweil shuoweil requested a review from a team as a code owner February 25, 2026 21:15
@shuoweil shuoweil enabled auto-merge (squash) February 25, 2026 21:15
@shuoweil shuoweil merged commit 7813eaa into main Feb 26, 2026
19 of 25 checks passed
@shuoweil shuoweil deleted the shuowei-anywidget-cell-visual branch February 26, 2026 23:16
chelsea-lin added a commit that referenced this pull request Mar 4, 2026
PR created by the Librarian CLI to initialize a release. Merging this PR
will auto trigger a release.

Librarian Version: v0.8.3
Language Image:
us-central1-docker.pkg.dev/cloud-sdk-librarian-prod/images-prod/python-librarian-generator@sha256:160860d189ff1c2f7515638478823712fa5b243e27ccc33a2728669fa1e2ed0c
<details><summary>bigframes: v2.37.0</summary>

##
[v2.37.0](v2.36.0...v2.37.0)
(2026-03-03)

### Features

* Add cloud_function_cpus option to remote_function (#2475)
([4caf74c](4caf74cc))

* add display.render_mode to control DataFrame/Series visualization
(#2413)
([7813eaa](7813eaa6))

* Support pd.col expressions with .loc and getitem (#2473)
([ae5c8b3](ae5c8b32))

* add support for Python 3.14 (#2232)
([c25a6d0](c25a6d01))

* Support pd.col simple aggregates (#2480)
([cb00daa](cb00daab))

* add dt.tz_localize() (#2469)
([f70f93a](f70f93a1))

* Update bigquery.ai.generate_table output_schema to allow Mapping type
(#2463)
([f7fd189](f7fd1895))

### Bug Fixes

* upload local data through write API if nested JSONs detected (#2478)
([01dc5a3](01dc5a34))

* allow IsInOp with same dtypes regardless nullable (#2466)
([1d81b41](1d81b414))

### Documentation

* Add code examples to configuration docstrings (#2352)
([3c21993](3c21993e))

* Move readme content to new User Guide section (#2464)
([61a9484](61a94845))

* add code sample and docstring for bpd.options.experiments.sql_compiler
(#2474)
([867951b](867951bc))

* use direct API for image (#2465)
([8a1a82f](8a1a82f7))

* Fix recall_score doc example (#2477)
([a6f499c](a6f499c1))

* Skip inherited methods, use autosummary only for big classes (#2470)
([a951249](a9512498))

* add bigframes default connection warning (#2471)
([f1bbba2](f1bbba23))

</details>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: l Pull request size is large.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.