CBSE Class 12 Informatics Practices Question 107 of 167

Python Pandas — I — Question 18

Back to all questions
18
Question

Question 18

What is the difference between iat and at with respect to a DataFrame ?

Answer
iat methodat method
iat is used for integer-based indexing.at is used for label-based indexing.
It allows to access a single value in the DataFrame by specifying the row and column indices using integers.It allows to access a single value in the DataFrame by specifying the row and column labels (index or column names).
The syntax is df.iat[row_index, col_index].The syntax is df.at[row_label, col_label].