Some comments on interchange API from an Arrow developer
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 20/100
Direzione di ricerca
L’issue rimanda al Column docstring, alla sua proprietà null_count e al dtype docstring; inizia leggendo queste sezioni e il current interchange proposal. Risolvi la Arrow C interface wording, le mask and null semantics, variable-size strings, conversions e il nested-data scope nella documentazione dell’API o nel design; il lavoro è completato quando le questioni aperte hanno decisioni chiare e guidance aggiornata.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 106
- Fork
- 22
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di data-apis/dataframe-api
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
data-apis/dataframe-api#363 · 1 commento · 8 reazioni ·
-
Row ordering design choiceApertaAPI design
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
data-apis/dataframe-api#356 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
data-apis/dataframe-api#355 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
data-apis/dataframe-api#352 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
data-apis/dataframe-api#351 ·
Tutte le issue di data-apis/dataframe-api
Issue simili
-
SSM GetParameter throttling during concurrent workflow launchesForse già presa @alexiswl l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
-
[Bug] Dev image build fails: `npm install` in the root Dockerfile runs out of memory (exit 134)Forse già presa @andest01 l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
Rename FunctionalRole BOT_DEV to DEV_STAFFForse già presa Una pull request collegata a questa issue è aperta o già unita. Apertaenhancement good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 79/100
pesu-dev/discord_bot#97 ·
-
Difficoltà 1/5 1-3 ore Idoneità per principianti 88/100
gradio-app/gradio#13964 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 93/100
BSData/horus-heresy-3rd-edition#3232 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno