Code Sample, a copy-pastable example if possible


import numpy as np
import pandas as pd

test = [0,1,2,3,4]
test_np = np.array(test)
test_pd = pd.DataFrame(test,columns ={'Val'})
print(test[0:1])
print(test_np[0:1])
print(test_pd[0:1])
print(test_pd.loc[0:1])

>>[0]
>>[0]
>>       Val
       0    0
>>      Val
      0    0
      1    1

When using slices with Pandas DataFrame, in case of accessing rows with ".loc", the stopper is included in the output.

I don't know if it is on purpose but it looks to me that it is not consistent with python standards and therefore is confusing?

Comment From: jreback

pls read the docs: http://pandas.pydata.org/pandas-docs/stable/indexing.html

.loc is for label indexing and includes both endpoints .iloc is for positional indexing and acts similarly to numpy / python