The normal behavior of .loc is to make selections of data based on the exact labels passed to it. It raises a KeyError when these labels are not found in the index. However, one special exception to this behavior exists whenever the index is lexicographically sorted, and a slice is passed to it. Selection is now possible between the start and stop labels of the slice, even if they are not exact values of the index.