Eliminate inplace=True in favor of reassignment
Recipe ID
org.openrewrite.python.cleanup.PandasAvoidInplaceArtifactopenrewrite-static-analysisConvert pandas operations that use inplace=True into reassignment form, e.g. df.drop_duplicates(inplace=True) becomes df = df.drop_duplicates().
Single recipeProprietary
Usage
This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.
mod run . --recipe org.openrewrite.python.cleanup.PandasAvoidInplaceIf the recipe isn’t available locally, install it with:
mod config recipes pip install openrewrite-static-analysis