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

ℹ Unsafe fix
1 1 | 
2 2 | import pandas as pd
3 3 | x = pd.DataFrame()
4   |-x.drop(["a"], axis=1, inplace=True)
  4 |+x = x.drop(["a"], axis=1)


