data.df_from_csv silently replaces text and empty cells with numeric zero
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ó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 75/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- c
- Lĩnh vực
- data-engineering
Hướng nghiên cứu
Read lib/data.eigs lines 40–45 and the num contract in docs/SPEC.md, then run the provided CSV reproduction. Add regression coverage in tests/test_data.eigs for text, empty cells, and numeric values, and review docs/STDLIB.md for the inference policy. Done means text and empty cells retain their values and types while valid numbers remain numeric.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
data.df_from_csv silently converts text fields such as names and empty strings into numeric zero. A normal mixed text/numeric CSV loses its names and other textual data on import.
Reproduce
Run from the repository root:
probe_dir=$(mktemp -d)
printf 'name,age,note\nAlice,30,\nBob,0,x12\n' > "$probe_dir/input.csv"
src/eigenscript -e 'import data
argv is args of null
print of (json_encode of (data.df_from_csv of argv[0]))' "$probe_dir/input.csv"
Actual (exit 0):
[{"name":0,"age":30,"note":0},{"name":0,"age":0,"note":0}]
Expected: Alice, Bob, the empty note, and x12 remain strings; 30 and 0 are numeric. This fixture needs no CSV quoting or dialect decisions.
Cause and coverage
lib/data.eigs:40–45 attempts numeric conversion and then checks whether the result has type num. The num contract explicitly converts strings without a leading number to numeric 0, so that check cannot distinguish successful numeric parsing from text. The branch that preserves the original string is unreachable for string cells.
df_from_csv is documented as the typed-column CSV reader. Existing tests/test_data.eigs constructs dataframes with df_from_rows and does not exercise CSV import/export.
A regression should assert both values and types for alphabetic text, empty cells, and valid zero and nonzero numbers. Preserve text rather than using a failed numeric conversion as zero. Decide and document the inference policy for ambiguous numeric-prefix strings such as 12abc; this report does not claim the existing documentation already specifies that case.
Confirmed with a fresh default release build of b91768e23c5a874a64e76e4af9ab291e6aa49983, with inherited EIGS_* variables removed.
- Ngôn ngữ chính
- C
- Star
- 3
- Fork
- 7
- Merge trung bình
- 4 giờ 15 phút
- Pull request đã merge (30 ngày)
- 106
Chuẩn bị môi trường
Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.
- Có Dockerfile hoặc 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 InauguralSystems/EigenScript
-
area:lint-tooling bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
InauguralSystems/EigenScript#1340 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:stdlib found-by:code-review kind:silent-wrong
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
InauguralSystems/EigenScript#1338 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:lint-tooling found-by:critic kind:docs-drift
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
InauguralSystems/EigenScript#1335 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area:ci found-by:critic kind:gate-defect
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
InauguralSystems/EigenScript#1311 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enrolment: decide test_gc_runner_controls.py (exempt vs enrol) and whether floors need a ratchetĐang mởarea:gates found-by:critic kind:decision
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
InauguralSystems/EigenScript#1280 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của InauguralSystems/EigenScript
Issue tương tự
-
bug needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
netdata/netdata#24062 · 1 bình luận ·
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 76/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
riscv-software-src/riscv-isa-sim#2448 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
NabuCasa/silabs-firmware-builder#231 · 1 bình luận ·