Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

styling: a float column holding an infinity falls back to the obj displayer (OverflowError in _formatted_char_count)

Open Beginner friendly
#1,075 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
76/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
pandas, python

Research direction

Start in customizations/styling.py at _formatted_char_count, then trace how its result is used by DefaultMainStyling.style_column and the summary-stats styling. Reproduce with the provided infinity example; done means non-finite bounds no longer raise OverflowError and the float column keeps its float displayer instead of falling back.

Written by the indexing model from the issue text.

Description

Histograms

Problem

_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.

import numpy as np
import pandas as pd
from buckaroo.buckaroo_widget import BuckarooWidget

df = pd.DataFrame({"with_inf": [1.5, 2.5, np.inf, 4.5], "no_inf": [1.5, 2.5, 3.5, 4.5]})
for cc in BuckarooWidget(df).df_display_args["main"]["df_viewer_config"]["column_config"]:
    print(cc["header_name"], cc["displayer_args"])
# with_inf {'displayer': 'obj'}
# no_inf {'displayer': 'float', 'min_fraction_digits': 3, 'max_fraction_digits': 3}

Suggested fix

Size from the finite bounds: skip a non-finite min or max the way NaN is skipped.

Context

Found while testing the infinity histograms in #1069. Reproduces on main at 315286fd.

Dominant language
Python
Stars
685
Forks
17
Avg merge
23h 34m
Merged PRs (30d)
24

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from buckaroo-data/buckaroo

All issues in buckaroo-data/buckaroo

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.