[ENH] Automatically convert non-string categorical data in attributes_arff_from_df
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 52/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Python
- Star
- 362
- Fork
- 304
- Merge trung bình
- 2 ngày 20 giờ
- Pull request đã merge (30 ngày)
- 2
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của openml/openml-python
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
openml/openml-python#1753 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[ENH] list_estimation_procedures() should include the procedure IDsCó thể đã có người làm @Jayant-kernel đã nhận 8 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
openml/openml-python#1750 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
openml/openml-python#1749 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Documentation Good First Issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
openml/openml-python#1708 · 8 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Good First Issue module:Run testing
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
openml/openml-python#1646 · 9 bình luận · 3 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của openml/openml-python
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
NousResearch/hermes-plugin-claude-subscription-directsdk#94 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Claiming namespace `reactogenic`Đang mởnamespace operations
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
EclipseFdn/open-vsx.org#13702 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
modelscope/ms-swift#10287 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
modelscope/FunASR#3757 ·
Maintainer thường phản hồi trong vòng 1 ngày