polars/polars-dataframe-orient
| Pack | Severity | Fix | Versions |
|---|---|---|---|
| Polars | info | none, edit by hand | All versions |
Nested list data can fit both DataFrame orientations. Set orient explicitly so the values land in the intended columns.
pl.DataFrame([[1, 2], [3, 4]], schema=["x", "y"])pl.DataFrame([[1, 2], [3, 4]], schema=["x", "y"], orient="row")What the rule reports
Section titled “What the rule reports”Inferred first row (1, 3). Explicit row orientation gave (1, 2).
How to fix it
Section titled “How to fix it”Edit the code using the replacement in the example.
Diagnostic message
Section titled “Diagnostic message”Nested list data can fit both DataFrame orientations. Set orient explicitly so the values land in the intended columns.See all rules in the Polars pack.