このページは日本語には対応しておりません。随時翻訳に取り組んでいます。翻訳に関してご質問やご意見ございましたら、お気軽にご連絡ください。

Metadata

ID: python-pandas/avoid-inplace

Language: Python

Severity: Warning

Category: Best Practices

Description

Avoid using inplace=True as it does not have clear performance impact and is potentially dangerous and does not behave as it should.

Learn More

Non-Compliant Code Examples

df.drop(['a'], axis=1, inplace=True)

Compliant Code Examples

df.drop(['a'], axis=1, inplace=False)
https://static.datadoghq.com/static/images/logos/github_avatar.svg https://static.datadoghq.com/static/images/logos/vscode_avatar.svg jetbrains

Seamless integrations. Try Datadog Code Analysis

PREVIEWING: may/unit-testing