Skip to content

Conversation

@shuoweil
Copy link
Contributor

@shuoweil shuoweil commented Jan 10, 2026

This PR introduces a max_columns configuration for anywidget mode, giving users control over how many columns are rendered in the interactive table. This is particularly useful for improving readability and performance when working with wide DataFrames.

Key Changes:

  • Configurable Column Limit: Users can now set bigframes.options.display.max_columns to limit the number of displayed columns.
  • Interactive Control: The TableWidget now includes a "Max columns" dropdown in the footer, allowing users to dynamically adjust this setting (options: 3, 5, 10, 15, 20, All).
  • Smart Truncation: When columns exceed the limit, the table displays the first N/2 and last N/2 columns, separated by an ellipsis (...) column.
  • Default Value: The default max_columns is set to 7 to provide a balanced view on standard screens without requiring horizontal scrolling.

Example Usage:

   1 import bigframes.pandas as bpd
   2 
   3 # Set global option
   4 bpd.options.display.max_columns = 10
   5 
   6 # Or use context manager
   7 with bpd.option_context("display.max_columns", 5):
   8     display(df)

verified at:

Fixes #<452681068> 🦕

@shuoweil shuoweil self-assigned this Jan 10, 2026
@shuoweil shuoweil requested review from a team as code owners January 10, 2026 01:23
@product-auto-label product-auto-label bot added the size: l Pull request size is large. label Jan 10, 2026
@review-notebook-app
Copy link

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 the api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. label Jan 10, 2026
@shuoweil shuoweil requested a review from tswast January 10, 2026 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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.

1 participant