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

[ENH] Automatically convert non-string categorical data in attributes_arff_from_df

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

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
52/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
pandas, python
領域
data

調査の方向性

Locate the Python entry point for attributes_arff_from_df and inspect how categorical columns currently reject non-string values. Exercise it with a pandas DataFrame whose categorical values are integers, then verify that the conversion succeeds and produces string nominals instead of raising the current ValueError.

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

説明

Is your feature request related to a problem? Please describe.
Currently, attributes_arff_from_df raises a ValueError if a pandas DataFrame contains a categorical column with non-string values (e.g., integers [0, 1]). The user is forced to manually cast these to strings before passing the DataFrame.

Describe the solution you'd like
Instead of raising an error immediately, the function should attempt to automatically convert the categories to strings using .astype(str). This improves UX for users working with mixed-type or integer-encoded categorical data.

Describe alternatives you've considered
Keep raising the error, but improve the message. However, automatic conversion is more user-friendly as ARFF expects string nominals anyway.

Additional context
I have a fix implemented locally and can submit a PR.

主要言語
Python
スター
361
フォーク
296
平均マージ
2日 20時間
マージ済み PR(30日)
2

環境構築

はじめの一歩

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

openml/openml-python のほかの issue

openml/openml-python の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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