Derived from the pandas-vet linter.
What it does#
Checks for uses of
pd.merge on Pandas objects.
Why is this bad?#
In Pandas, the
.merge method (exposed on, e.g., DataFrame objects) and
pd.merge function (exposed on the Pandas module) are equivalent.
For consistency, prefer calling
.merge on an object over calling
pd.merge on the Pandas module, as the former is more idiomatic.
pd.merge is not a method, but a function, which prohibits it
from being used in method chains, a common pattern in Pandas code.