Difference between pandas .iloc and .iat?

iat and at working with scalar only, so very fast. Slower, more general functions are iloc and loc.

You can check docs:

Since indexing with [] must handle a lot of cases (single-label access, slicing, boolean indexing, etc.), it has a bit of overhead in order to figure out what you’re asking for. If you only want to access a scalar value, the fastest way is to use the at and iat methods, which are implemented on all of the data structures.

Similarly to loc, at provides label based scalar lookups, while, iat provides integer based lookups analogously to iloc.


iat and at gives only a single value output, while iloc and loc can give multiple row output.
Example:
iloc[1:2,5:8] is valid but iat[1:2,5:8] will throw error