You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
styling: a float column holding an infinity falls back to the obj displayer (OverflowError in _formatted_char_count) #1075
_formatted_char_count (customizations/styling.py:25) sizes a float column from int(max(abs(max), abs(min))). It guards NaN (max_abs == max_abs) but not infinity, so a column whose min or max is inf or -inf raises OverflowError: cannot convert float infinity to integer. DefaultMainStyling.style_column calls it through estimate_min_width_px (line 130), style_column_with_fallback (dataflow/styling_core.py:560) logs the warning and falls back, and the column is shown with the obj displayer and no minWidth. The summary-stats view (DefaultSummaryStatsStyling) falls back the same way. Pandas and polars widgets both do this, and so does the DDD frame df_with_infinity.
Probe script for this issue. Save it as probe_1075.py in a buckaroo checkout and run uv run python probe_1075.py. The output below is from main at e88ace9.
probe_1075.py
"""_formatted_char_count sizes a float column with int(max(abs(max), abs(min))); an infinite bound raisesOverflowError and style_column_with_fallback drops the column to the obj displayer."""importlogginglogging.basicConfig(level=logging.WARNING, format='LOG: %(message).160s')
importnumpyasnpimportpandasaspdimportpolarsasplfrombuckaroo.buckaroo_widgetimportBuckarooWidgetfrombuckaroo.polars_buckarooimportPolarsBuckarooWidgetdf=pd.DataFrame({'with_inf': [1.5, 2.5, np.inf, 4.5], 'with_neg_inf': [1.5, 2.5, -np.inf, 4.5],
'no_inf': [1.5, 2.5, 3.5, 4.5]})
forlabel, win [('pandas', BuckarooWidget(df)), ('polars', PolarsBuckarooWidget(pl.from_pandas(df)))]:
forccinw.df_display_args['main']['df_viewer_config']['column_config']:
print(label, cc['header_name'], cc['displayer_args'], cc.get('ag_grid_specs'))
Activity
paddymul commentedon Oct 7, 2026
Probe script for this issue. Save it as
probe_1075.pyin a buckaroo checkout and runuv run python probe_1075.py. The output below is from main at e88ace9.probe_1075.py
Output at e88ace9