You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fd.suggest_plan / fd.plan raise TypeError on duplicate column labels #459
Severity: S2 (crash on a supported input) — found by the production-readiness fuzz campaign (FDC-L3-014) Where:src/freshdata/engine/context.py:258 — build_context
fd.suggest_plan / fd.plan raise on a frame with duplicate column labels, which fd.clean accepts (it deduplicates them to "x", "x_2"):
TypeError: cannot convert the series to <class 'int'>
from int(s.isna().sum()), because df[label] returns a DataFrame rather than a Series.
Fix: select positionally, as the other APIs in this family now do — or raise the documented ValueError("... requires unique column labels ...") that fd.infer_roles / fd.explain_clean raise, so the behaviour is at least consistent.
Related: #445/#446/#452 (same duplicate-label family, other APIs), #265, #231 (closed).
Activity
fix(labels): accept missing labels, keep label identity, reject dupli…
fix(labels): accept missing labels, keep label identity, reject dupli…