Some comments on interchange API from an Arrow developer
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 20/100
Línea de trabajo
El issue apunta al Column docstring, su propiedad null_count y el dtype docstring; empieza leyendo esas secciones y el current interchange proposal. Resuelve la Arrow C interface wording, las mask and null semantics, variable-size strings, conversions y el nested-data scope en la documentación de la API o en el diseño; la tarea estará terminada cuando las preguntas abiertas tengan decisiones claras y guidance actualizado.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
hi all, great to see some continued work on this project after the original discussion from last year. I still think it's useful to allow libraries to "throw data over the wall" without forcing eager serialization to a particular format (like pandas or Arrow)
From Column docstring:
TBD: Arrow has a separate "null" dtype, and has no separate mask concept.
Instead, it seems to use "children" for both columns with a bit mask,
and for nested dtypes. Unclear whether this is elegant or confusing.
This design requires checking the null representation explicitly.
Could you clarify what is confusing? I do not understand the statement 'Instead, it seems to use "children" for both columns with a bit and for nested dtypes.'
Later
The Arrow design requires checking:
1. the ARROW_FLAG_NULLABLE (for sentinel values)
2. if a column has two children, combined with one of those children
having a null dtype.
Making the mask concept explicit seems useful. One null dtype would
not be enough to cover both bit and byte masks, so that would mean
even more checking if we did it the Arrow way.
You mean the Arrow C interface here. Could you clarify what these other things mean?
- If ARROW_FLAG_NULLABLE is set, then the first buffer (the validity bitmap) governs nullness.
- The 2nd item here "if a column has two children, combined with one of those children having a null dtype." does not make sense to me, because nulls in Arrow are exclusively determined by the validity bitmap. Arrow does have a "Null" type, but this represents data whose values are always all null and has no associated buffers.
Re: "One null dtype would not be enough to cover both bit and byte masks, so that would even more checking if we did it the Arrow way.", I don't know what this means, could you clarify?
Column methods
@property
def null_count(self) -> Optional[int]:
"""
Number of null elements, if known.
Note: Arrow uses -1 to indicate "unknown", but None seems cleaner.
"""
pass
Here you should indicate that you mean that the Arrow C interface (where the null_count is an int64)
General comments / questions
- It feels a little unfortunate to go "halfway to Arrow" with adding the string
offsetsbuffer, requiring serialization always for variable-size binary data. I haven't thought through what would be alternatives for string data that do not necessarily force this serialization (similar to the API proposal from https://github.com/wesm/dataframe-protocol/pull/1) — if the goal of this API is to reduce the need to serialize, having some alternative here might be worthwhile - It seems like it would be useful to provide some
to_*methods on Column (likeColumn.to_arrow) — I guess thatpyarrowcould implement a built-in implementation of this interface, but some producers might be able to produce Arrow or NumPy arrays directly and skip the lower-level memory export that's provided here. - Is there interest in supporting nested / non-flat data in this interchange API? I notice that they are explicitly excluded from the
dtypedocstring, but I would encourage you to think about them up front rather than bolting on later.
- Lenguaje dominante
- Python
- Estrellas
- 106
- Forks
- 22
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 data-apis/dataframe-api
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
data-apis/dataframe-api#363 · 1 comentario · 8 reacciones ·
-
Row ordering design choiceAbiertoAPI design
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
data-apis/dataframe-api#356 · 1 comentario ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
data-apis/dataframe-api#355 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
data-apis/dataframe-api#352 ·
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
data-apis/dataframe-api#351 ·
Todos los issues de data-apis/dataframe-api
Issues similares
-
pulp-cli 0.41 break username password auth in older configs (cert and key present but empty)Abiertobug Triage-Needed
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
FuRongJun-1999/dsh-memory#170 ·
Los mantenedores suelen responder en 1 día
-
[开源推荐] 打拼音就出篆书的输入法,附古文字创作小工具Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
521xueweihan/HelloGitHub#3940 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100