Closed s-banach closed 1 year ago
Copy on write is probably going to be the default in pandas 3.0, so this should be viewed as a legitimate issue.
Fixing this is typically as simple as replacing df[col].method(inplace=True)
with df[col] = df[col].method()
.
thanks for reporting this. I can fix it once I have some time. Or maybe you can create a PR if you want to
Here is a basic error message you will get when running (probably) any of the encoders after setting
pd.options.mode.copy_on_write = True
.A quick way to fix this automatically would be to run
ruff
with the PD rules enabled, in particularPD002
which removes all uses ofinplace
.