Returning Even Indexed Rows

In this example, we return all rows with an even index.

Creating a dataframe

import pandas as pd

df = pd.DataFrame({ 'Name': ['Wayne Rooney', 'Paul Pogba', 'Juan Mata', 
                             'Marcus Rashford', 'Jessie Lingard', 'De Gea'] })
df

Name
0 Wayne Rooney
1 Paul Pogba
2 Juan Mata
3 Marcus Rashford
4 Jessie Lingard
5 De Gea

Returning even indexed rows

df.iloc[lambda x: x.index % 2 == 0]
Name
0 Wayne Rooney
2 Juan Mata
4 Jessie Lingard