oupby.html)
  * [ Resampling ](../resampling.html)
  * [ Style ](../style.html)
  * [ Plotting ](../plotting.html)
  * [ Options and settings ](../options.html)
  * [ Extensions ](../extensions.html)
  * [ Testing ](../testing.html)
  * [ Missing values ](../missing_value.html)

  * [ __ ](../../index.html)
  * [ API reference ](../index.html)
  * [ DataFrame ](../frame.html)
  * pandas.DataFrame.at 

#  pandas.DataFrame.at  #

_ property  _ DataFrame.  at  [ [source]  ](https://github.com/pandas-
dev/pandas/blob/v2.2.2/pandas/core/indexing.py#L611-L674) #

    

Access a single value for a row/column label pair.

Similar to ` loc  ` , in that both provide label-based lookups. Use ` at  ` if
you only need to get or set a single value in a DataFrame or Series.

Raises  :

    

KeyError

    

If getting a value and âlabelâ does not exist in a DataFrame or Series.

ValueError

    

If row/column label pair is not a tuple or if any label from the pair is not a
scalar for DataFrame. If label is list-like ( _excluding_ NamedTuple) for
Series.

See also

` DataFrame.at  `

    

Access a single value for a row/column pair by label.

[ ` DataFrame.iat  ` ](pandas.DataFrame.iat.html#pandas.DataFrame.iat
"pandas.DataFrame.iat")

    

Access a single value for a row/column pair by integer position.

[ ` DataFrame.loc  ` ](pandas.DataFrame.loc.html#pandas.DataFrame.loc
"pandas.DataFrame.loc")

    

Access a group of rows and columns by label(s).

[ ` DataFrame.iloc  ` ](pandas.DataFrame.iloc.html#pandas.DataFrame.iloc
"pandas.DataFrame.iloc")

    

Access a group of rows and columns by integer position(s).

[ ` Series.at  ` ](pandas.Series.at.html#pandas.Series.at "pandas.Series.at")

    

Access a single value by label.

[ ` Series.iat  ` ](pandas.Series.iat.html#pandas.Series.iat
"pandas.Series.iat")

    

Access a single value by integer position.

[ ` Series.loc  ` ](pandas.Series.loc.html#pandas.Series.loc
"pandas.Series.loc")

    

Access a group of rows by label(s).

[ ` Series.iloc  ` ](pandas.Series.iloc.html#pandas.Series.iloc
"pandas.Series.iloc")

    

Access a group of rows by integer position(s).

Notes

See [ Fast scalar value getting and setting
](../../user_guide/indexing.html#indexing-basics-get-value) for more details.

Examples

    
    
    >>> df = pd.DataFrame([[0, 2, 3], [0, 4, 1], [10, 20, 30]],
    ...                   index=[4, 5, 6], columns=['A', 'B', 'C'])
    >>> df
        A   B   C
    4   0   2   3
    5   0   4   1
    6  10  20  30
    

Get value at specified row/column pair

    
    
    >>> df.at[4, 'B']
    2
    

Set value at specified row/column pair

    
    
    >>> df.at[4, 'B'] = 10
    >>> df.at[4, 'B']
    10
    

Get value within a Series

    
    
    >>> df.loc[5].at['B']
    4
    

[ __ previous  pandas.DataFrame.head  ](pandas.DataFrame.head.html "previous
page") [ next  pandas.DataFrame.iat  __ ](pandas.DataFrame.iat.html "next
page")

__ On this page

  * ` DataFrame.at  `

[ __ Show Source ](../../_sources/reference/api/pandas.DataFrame.at.rst.txt)

© 2024, pandas via [ NumFOCUS, Inc. ](https://numfocus.org) Hosted by [
OVHcloud ](https://www.ovhcloud.com) .

Created using [ Sphinx ](https://www.sphinx-doc.org/) 7.2.6.  

Built with the [ PyData Sphinx Theme ](https://pydata-sphinx-
theme.readthedocs.io/en/stable/index.html) 0.14.4.