1indices = [133, 22, 19, 203, 14, 1]
2df_by_indices = df.iloc[indices, :]
1df = df.loc[df.index.repeat(df['a'])]
2df['c'] = df.groupby(level=0).cumcount() + 1
3df = df.reset_index(drop=True)
4print (df)
5 a b c
60 1 x 1
71 2 y 1
82 2 y 2
93 3 z 1
104 3 z 2
115 3 z 3
12