Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Series.corr and Series.cov need a second column and index alignment

Aperta
#331 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
55/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
pandas, python

Direzione di ricerca

Inizia con il limite di riduzione Series esistente da #330, quindi esamina le voci di conformità per resolution/series.corr e signature/series.corr e i risultati del driver scritti a mano. Traccia come potrebbe essere passato un secondo PySeries e dove dovrebbero collocarsi l’allineamento degli indici e la gestione a coppie dei valori mancanti. Il lavoro è concluso quando corr e cov raggiunti da pandas corrispondono al comportamento Pearson misurato, mentre i metodi non supportati vengono rifiutati in base al nome.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Two of the seventeen reductions in AggKind were left out of #330 for the same reason, and it is not that the kernel is missing. AggKind.CORR and AggKind.COV are both implemented. What is missing is the shape of the call.

Every other reduction in that PR takes one column and answers one number, which is why they all fit through one boundary method that takes a reduction name and a float parameter. corr and cov take a second series:

s.corr(other, method="pearson", min_periods=None)
s.cov(other, min_periods=None, ddof=1)

That second argument is not a number the existing door can carry. It is a whole series, and pandas aligns it against the receiver's index before computing anything, so pd.Series([1, 2, 3], index=["a", "b", "c"]).corr(pd.Series([3, 2, 1], index=["c", "b", "a"])) is not the same as pairing the two by position. Rows that appear in one index and not the other are dropped from the pair rather than treated as missing.

So this needs, in order:

  • a boundary method that accepts a second PySeries rather than a scalar
  • index alignment between two series, which is the piece that does not exist yet and is the actual work
  • the pairwise missing rule, where a row is used only if both sides have a value there

min_periods and method are separate. method accepts "pearson", "kendall", "spearman" or a callable in pandas, and the kernel implements Pearson, so the other three should refuse by name the way the other unimplemented parameters in #330 do.

DataFrame.corr and DataFrame.cov answer a square frame rather than a number and are a further step again, but they sit on the same alignment work.

The conformance board already has stats/corr-pearson, stats/cov and stats/corr-with-nulls passing through the hand written driver, so the behaviour is measured. What is not measured is the same operation reached by a pandas program, which is what resolution/series.corr and signature/series.corr ask and currently report as absent.

Follow-up to #330. Part of the M6 work tracked in #8.

Lingua principale
Mojo
Stelle
3
Fork
0
Merge medio
9m
PR unite (30g)
407

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di tamnd/firepanda

Tutte le issue di tamnd/firepanda

Issue simili

Altre issue su Data Engineering

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.