def multiindex_me(df, how_many_groups=3, group_names=None):
    m = np.arange(len(df))
reset = lambda df: df.reset_index(drop=True)
new_df = df.groupby(m % how_many_groups).apply(reset)
if group_names is not None:
    new_df.index.set_levels(group_names, level=0, inplace=True)
return new_df
Pandas: slicing a dataframe into multiple sheets of the same spreadsheet