Here are some comparisons
In [100]: df = DataFrame(randn(100000,10))
simple method (but I think the range makes it slow), but will work regardless of the index (for example, should not be a numeric index)
In [96]: %timeit df.iloc[range(0,len(df),2)] 10 loops, best of 3: 21.2 ms per loop
This requires a Int64Index -based Int64Index (which is easy to get, just reset_index() ).
In [107]: %timeit df.iloc[(df.index % 2).astype(bool)] 100 loops, best of 3: 5.67 ms per loop In [108]: %timeit df.loc[(df.index % 2).astype(bool)] 100 loops, best of 3: 5.48 ms per loop
do not forget to indicate the position of the index
In [98]: %timeit df.take(df.index % 2) 100 loops, best of 3: 3.06 ms per loop
same as above but no negative sign conversions
In [99]: %timeit df.take(df.index % 2,convert=False) 100 loops, best of 3: 2.44 ms per loop
This winner is @AndyHayden soln; it only works on one dtype
In [118]: %timeit DataFrame(df.values[::2],index=df.index[::2]) 10000 loops, best of 3: 63.5 us per loop
source share