Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

`col_summary_tbl()` raises a bare `AssertionError` when no column has a supported type

Aperta
#467 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
Mezza giornata
Idoneità per principianti
62/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
pandas, python
Ambito
data, testing-qa

Direzione di ricerca

Start with the bare assert self.column_profiles in as_dataframe() in scan_profile.py (around line 270), then look at the is_illegal and NotImplementedError skip checks in datascan.py. Run the reproducer with a Decimal-only or time-only polars frame and confirm the AssertionError. Done means either a clear error that names the skipped column types, or a summary that lists unsupported columns, with the mixed-type case also reporting them. The issue leaves the choice between those two open, so confirm which one to implement with the maintainers first.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Description

col_summary_tbl() raises an AssertionError with no message when none of the table's columns has a type it can profile, for example a table of only Decimal or Time columns, or a pandas object column holding booleans and None.

Minimal reproducible example

import datetime
import decimal

import pandas as pd
import polars as pl
import pointblank as pb

pb.col_summary_tbl(pl.DataFrame({"amount": [decimal.Decimal("1.50"), decimal.Decimal("2.25")]}))
  File ".../pointblank/scan_profile.py", line 270, in as_dataframe
    assert self.column_profiles
AssertionError

The same happens with:

pb.col_summary_tbl(pl.DataFrame({"t": [datetime.time(9, 0), datetime.time(10, 30)]}))
pb.col_summary_tbl(pd.DataFrame({"flag": [True, None, False]}))  # object dtype
pb.col_summary_tbl(
    pl.DataFrame({"amount": [decimal.Decimal("1.5")], "t": [datetime.time(9, 0)]})
)

Expected

Either an error that says no column could be summarized and which types were skipped, or a summary table that lists those columns as unsupported.

Actual

A bare AssertionError from _DataProfile.as_dataframe(). DataScan skips columns whose type _TypeMap cannot profile (datascan.py, the is_illegal / NotImplementedError checks), so when every column is skipped column_profiles is empty and the internal assertion fails.

When only some columns are unsupported the report renders, but those columns are left out with no note. For pl.DataFrame({"amount": [decimal.Decimal("1.50")], "n": [1]}), the summary shows only n. Fixing the error case the second way would cover this too.

Environment

  • pointblank main (6412f6f8)
  • Python 3.12.13, polars 2.0.0, pandas 2.3.3
  • macOS (arm64)
Lingua principale
Python
Stelle
494
Fork
38
Merge medio
6h 59m
PR unite (30g)
33

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di posit-dev/pointblank

Tutte le issue di posit-dev/pointblank

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.