Examples

In [1]:
import numpy as np
import pandas as pd
In [3]:
df = pd.DataFrame([[0, 4, 5], [0, 6, 7], [20, 30, 40]],
                  index=[1, 2, 3], columns=['P', 'Q', 'R'])
df
Out[3]:
P Q R
1 0 4 5
2 0 6 7
3 20 30 40

Get value at specified row/column pair

In [6]:
df.at[2, 'Q']
Out[6]:
6

Set value at specified row/column pair

In [7]:
df.at[2, 'Q'] = 20
In [8]:
df.at[2, 'Q']
Out[8]:
20

Get value within a Series

In [9]:
df.loc[3].at['Q']
Out[9]:
30