Repository navigation
fix(polars): preserve rows in zero-column pandas inputs - #518
Conversation
Signed-off-by: WilliamK112 <164879897+WilliamK112@users.noreply.github.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Signed-off-by: WilliamK112 <164879897+WilliamK112@users.noreply.github.com>
JohnnyWilson16
left a comment
There was a problem hiding this comment.
LGTM! Cleanly fixes #463. Fallback policies are strictly enforced, input row counts and indices are preserved, and empty-column duplicate dropping in Polars is properly guarded. Ready to merge.
Cleaning a three-row pandas frame with no columns through the native Polars path returns
(0, 0)on Polars 1.36 without a fallback record. Route nonempty, zero-column pandas inputs through the existing recorded pandas fallback before ingestion, preserving their rows, index, and report counts with pandas output.The existing allow/warn/error fallback policy applies. Native-handle requests receive the disclosed pandas result, as with other input-driven fallbacks; a zero-row input with a RangeIndex still stays native. Also skip duplicate handling once the native schema has no columns, matching pandas and preventing Polars 2.0 from reporting or collapsing those rows as duplicates. Update the fallback matrix and changelog.
Fixes #463.
Validation on Windows / Python 3.12:
main@ba3f01fin this environment (Windows quoting/newline/filename fixtures and the zero-time semantic budget test).--platform linuxandnumpy<2.5, matching CI's typecheck dependency cap.