>>> s = pd.Series(list("abcdef"), index=[49, 48, 47, 0, 1, 2])49 a48 b47 c0 d1 e2 f
>>> s.loc[0] # value at index label 0'd'
>>> s.iloc[0] # value at index location 0'a'
>>> s.loc[0:1] # rows at index labels between 0 and 1 (inclusive)0 d1 e
>>> s.iloc[0:1] # rows at index location between 0 and 1 (exclusive)49 a
>>> df.loc['c': , :'z'] # rows 'c' and onwards AND columns up to 'z'x y zc 10 11 12d 15 16 17e 20 21 22
>>> df.iloc[:, 3] # all rows, but only the column at index location 3a 3b 8c 13d 18e 23