Why does .loc have inclusive behavior for slices? : <p>For some reason, the following 2 calls to <code>iloc</code> / <code>loc</code> produce different behavior:</p>

<pre><code>&gt;&gt;&gt; import pandas as pd
&gt;&gt;&gt; df = pd.DataFrame(dict(A=range(3), B=range(3)))
&gt;&gt;&gt; df.iloc[:1]
   A  B
0  0  0
&gt;&gt;&gt; df.loc[:1]
   A  B
0  0  0
1  1  1
</code></pre>

<p>I understand that <code>loc</code> considers the row labels, while <code>iloc</code> considers the integer-based indices of the rows. But why is the upper bound for the <code>loc</code> call considered inclusive, while the <code>iloc</code> bound is considered exclusive?</p>
