What are the rules of using pandas.Series.at
? How is it different from pandas.Series.loc
with a single label as input?
More specifically, I am trying to understand why the following example does not work with at
:
import pandas as pd
d = pd.Series(index=pd.MultiIndex.from_arrays([(0,0),('a','b')]), data=777).sort_index()
print(d)
# 0 a 777
# b 777
# dtype: int64
d [d.index[0]] # works
d.loc[d.index[0]] # works
d.at [d.index[0]] # ValueError: At based indexing on an non-integer index can only have non-integer indexers
Thank you very much for your help!