---
source: crates/ruff_linter/src/rules/pandas_vet/mod.rs
---
PD002 [*] `inplace=True` should be avoided; it has inconsistent behavior
 --> <filename>:4:23
  |
2 | import pandas as pd
3 | x = pd.DataFrame()
4 | x.drop(["a"], axis=1, inplace=True)
  |                       ^^^^^^^^^^^^
  |
help: Assign to variable; remove `inplace` arg
  |
3 | x = pd.DataFrame()
  - x.drop(["a"], axis=1, inplace=True)
4 + x = x.drop(["a"], axis=1)
  |
note: This is an unsafe fix and may change runtime behavior
