pandas-use-of-dot-stack (PD013)#
Derived from the pandas-vet linter.
What it does#
Checks for uses of .stack
on Pandas objects.
Why is this bad?#
Prefer .melt
to .stack
, which has the same functionality but with
support for direct column renaming and no dependence on MultiIndex
.
Example#
Use instead: