polars/polars-join-without-validate
| Rule | polars-join-without-validate |
|---|---|
| Pack | Polars |
| Severity | info |
| Fix | none, edit by hand |
| Library versions | every version |
A Polars join allows duplicate keys on either side by default. Pass validate when the keys should be unique on one or both sides.
df.join(df, on="x")df.join(df, on="x", validate="1:1")What the rule reports
Section titled “What the rule reports”Two identical keys on each side yielded 4 rows. 1:1 validation raised ComputeError.
How to fix it
Section titled “How to fix it”Edit the code using the replacement in the example.
Message
Section titled “Message”xpd prints this message with the issue. A name that starts with $ stands for code from your file.
A Polars join allows duplicate keys on either side by default. Pass validate when the keys should be unique on one or both sides.Browse the other rules of the Polars pack.