You can do Floor division on index and then groupby and mean:
df.groupby(df.index//4).mean()
If index
is not a range
index do:
out = df.reset_index()
out.drop("index",1).groupby(out.index//4).mean()
Or,
df.groupby(np.arange(len(df)) // 4).mean()
Gen1 Gen2 Gen3 Gen4
0 24.75 121.00 50.00 27.25
1 36.00 21.25 32.75 35.50
2 70.00 46.25 52.25 25.75
3 46.50 26.75 273.50 32.50
4 40.25 24.75 38.25 95.50
Check out this answer: Calculate average of every x rows in a table and create new table