In [2]:
df
Out[2]:
a b c
0 4.0 7 10.0
1 5.0 8 11.0
2 NaN 9 NaN

Change the row labels.

In [3]:
df.set_axis([10,20,30])
Out[3]:
a b c
10 4.0 7 10.0
20 5.0 8 11.0
30 NaN 9 NaN

Change the column labels.

In [4]:
df.set_axis(['a','b','c'])
Out[4]:
a b c
a 4.0 7 10.0
b 5.0 8 11.0
c NaN 9 NaN