When using slicing with iloc, the end index is exclusive, meaning the element at the end index is not included in the selection. For example, df.iloc[2:5, :] will select rows with indices 2, 3, and 4, but not 5.