From 1a341307a8dc3a6ec94dab9e9d340b2f7b504967 Mon Sep 17 00:00:00 2001 From: Aaron Kosel Date: Sat, 10 Mar 2018 13:18:30 -0600 Subject: [PATCH] DOC: update the DataFrame.iat[] docstring --- pandas/core/indexing.py | 30 +++++++++++++++++++++++++++--- 1 file changed, 27 insertions(+), 3 deletions(-) diff --git a/pandas/core/indexing.py b/pandas/core/indexing.py index ec2874b3bae95..9e0d7cd93fad2 100755 --- a/pandas/core/indexing.py +++ b/pandas/core/indexing.py @@ -1920,11 +1920,35 @@ def _convert_key(self, key, is_setter=False): class _iAtIndexer(_ScalarAccessIndexer): - """Fast integer location scalar accessor. + """ + Selects a single value for a row/column pair by integer position. - Similarly to ``iloc``, ``iat`` provides **integer** based lookups. - You can also set using these indexers. + Useful if performance is a major concern and you only need to + get or set a value at a particular row/column. + See Also + -------- + at : Selects a single value for a row/column label pair + loc : Selects a group of rows and columns by label(s) + iloc : Selects group of rows and columns by integer position(s) + + Returns + ------- + None + + Examples + -------- + >>> df = pd.DataFrame([[0,2,3], [0,4,1], [10,20,30]]) + >>> df + 0 1 2 + 0 0 2 3 + 1 0 4 1 + 2 10 20 30 + >>> df.iat[1, 2] + 1 + >>> df.iat[1, 2] = 10 + >>> df.iat[1, 2] + 10 """ _takeable = True