Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#467 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
半日
初心者へのやさしさ
62/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
pandas, python
領域
data, testing-qa

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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)
主要言語
Python
スター
494
フォーク
38
平均マージ
6時間 59分
マージ済み PR(30日)
33

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

posit-dev/pointblank のほかの issue

posit-dev/pointblank の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。