📅  最后修改于: 2022-03-11 14:45:44.611000             🧑  作者: Mango
# credit to the Stack Overflow user in the source link
# df is the pandas DataFrame
n = 25 # the number of rows
df.groupby(np.arange(len(df))//n).mean()