Derived from the pandas-vet linter.
What it does#
Checks for uses of
.iat on Pandas objects.
Why is this bad?#
.iat method selects a single value from a DataFrame or Series based
on an ordinal index, and is slightly faster than using
.iloc is more idiomatic and versatile, as it can be used to select
multiple values at once.
If performance is an important consideration, convert the object to a NumPy
array, which will provide a much greater performance boost than using
Or, using NumPy: