data.df_from_csv silently replaces text and empty cells with numeric zero
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 75/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- c
- Área
- data-engineering
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- C
- Estrellas
- 3
- Forks
- 7
- Merge medio
- 3 h 58 min
- PR fusionados (30 d)
- 105
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de InauguralSystems/EigenScript
-
area:lint-tooling bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
InauguralSystems/EigenScript#1340 ·
Los mantenedores suelen responder en 1 día
-
area:stdlib found-by:code-review kind:silent-wrong
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
InauguralSystems/EigenScript#1338 ·
Los mantenedores suelen responder en 1 día
-
area:lint-tooling found-by:critic kind:docs-drift
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
InauguralSystems/EigenScript#1335 ·
Los mantenedores suelen responder en 1 día
-
area:ci found-by:critic kind:gate-defect
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
InauguralSystems/EigenScript#1311 ·
Los mantenedores suelen responder en 1 día
-
enrolment: decide test_gc_runner_controls.py (exempt vs enrol) and whether floors need a ratchetAbiertoarea:gates found-by:critic kind:decision
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
InauguralSystems/EigenScript#1280 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de InauguralSystems/EigenScript
Issues similares
-
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
ClickHouse/pg_clickhouse#383 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
johnsonjh/emu2-cpm86#68 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Zenmap CrashAbiertoZenmap
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
BasedHardware/omi#19306 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 88/100
fastfetch-cli/fastfetch#2619 ·
Los mantenedores suelen responder en 1 día