{"record":{"id":"af5659d46e515b39","repo":"pola-rs/polars","slug":"how-must-be-one-of-left-inner-full-fo","errorCode":null,"errorMessage":"`how` must be one of {'left', 'inner', 'full'}; found {how!r}","messagePattern":"`how` must be one of (.+?); found (.+?)","errorType":"exception","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"py-polars/src/polars/lazyframe/frame.py","lineNumber":9369,"sourceCode":"        ╞═════╪══════╡\n        │ 1   ┆ -99  │\n        │ 2   ┆ 500  │\n        │ 3   ┆ null │\n        │ 4   ┆ 700  │\n        │ 5   ┆ -66  │\n        └─────┴──────┘\n        \"\"\"\n        require_same_type(self, other)\n        if how in (\"outer\", \"outer_coalesce\"):\n            how = \"full\"\n            issue_deprecation_warning(\n                \"use of `how='outer'` should be replaced with `how='full'`.\",\n                version=\"0.20.29\",\n            )\n\n        if how not in (\"left\", \"inner\", \"full\"):\n            msg = f\"`how` must be one of {{'left', 'inner', 'full'}}; found {how!r}\"\n            raise ValueError(msg)\n\n        row_index_name = None\n        if on is None:\n            if left_on is None and right_on is None:\n                # no keys provided--use row index\n                row_index_name = \"__POLARS_ROW_INDEX\"\n                self = self.with_row_index(row_index_name)\n                other = other.with_row_index(row_index_name)\n                left_on = right_on = [row_index_name]\n            else:\n                # one of left or right is missing, raise error\n                if left_on is None:\n                    msg = \"missing join columns for left frame\"\n                    raise ValueError(msg)\n                if right_on is None:\n                    msg = \"missing join columns for right frame\"\n                    raise ValueError(msg)\n        else:","sourceCodeStart":9351,"sourceCodeEnd":9387,"githubUrl":"https://github.com/pola-rs/polars/blob/df599052daf96e7a9cc30a3b0c6bd25d6947e3c0/py-polars/src/polars/lazyframe/frame.py#L9351-L9387","documentation":"LazyFrame.update overwrites values in self from `other` via a join; only 'left', 'inner', and 'full' matching strategies exist for updates. Any other `how` raises ValueError. 'outer'/'outer_coalesce' are accepted but deprecated (remapped to 'full' with a DeprecationWarning since polars 0.20.29).","triggerScenarios":"lf.update(other, on='id', how='right'), how='cross', how='semi', or any join-style strategy not in {'left','inner','full'}; copying a `how` value that is valid for LazyFrame.join into update.","commonSituations":"Porting join() code to update(); assuming join and update share the same strategy vocabulary; keeping how='outer' after a polars upgrade.","solutions":["Use one of 'left', 'inner', or 'full'","Replace deprecated how='outer' with how='full' to also silence the DeprecationWarning","For a right-side perspective, swap the frames: other.update(lf, ...) instead of how='right'"],"exampleFix":"// before\nlf.update(other, on='id', how='right')\n\n// after\nother.update(lf, on='id', how='left')  # right-update expressed from the other side","handlingStrategy":"validation","validationCode":"valid = {'left', 'inner', 'full'}\nif how in ('outer', 'outer_coalesce'):\n    how = 'full'\nif how not in valid:\n    raise ValueError(f'update strategy must be one of {valid}, got {how!r}')","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat update() strategies as a different vocabulary from join(); only left/inner/full exist","Run with DeprecationWarnings visible during upgrades so how='outer' gets fixed before it errors"],"tags":["polars","update","join","argument-validation"],"backgroundTag":null,"analyzedSha":"df599052daf96e7a9cc30a3b0c6bd25d6947e3c0","analyzedAt":"2026-08-16T12:10:03.978Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}