I think this is what you want. You need to pass the number of rows you want and throw it into a for loop.
def repeater(start, stop, num_rows, df = True):
a_list = []
df_list = []
for i in range(num_rows):
a = np.arange(start, stop)
np.random.shuffle(a)
if df == True:
df_list.append(pd.DataFrame(a).T)
else:
a_list.append(a)
if df == True:
a_df = pd.concat(df_list,axis=0).reset_index(drop=True)
return a_df
else:
return a_list
print(repeater(3, 14, 10, df = True))
print(repeater(3, 14, 10, df = False))
Output is either a dataframe or list of np arrays
0 1 2 3 4 5 6 7 8 9 10
0 7 4 13 3 12 8 5 10 11 9 6
0 12 4 8 9 13 3 5 7 11 6 10
0 12 10 13 11 8 3 4 5 6 9 7
0 9 12 3 11 6 8 7 5 4 10 13
0 4 8 10 13 6 7 5 9 11 3 12
0 12 10 5 4 11 8 9 13 7 3 6
0 6 10 7 8 12 9 5 11 13 3 4
0 8 11 10 7 4 5 3 12 6 13 9
0 13 4 3 7 12 6 11 10 9 5 8
0 13 7 8 10 11 9 6 4 3 5 12
Out[184]:
[array([11, 6, 8, 10, 4, 9, 12, 13, 7, 5, 3]),
array([ 5, 10, 6, 4, 9, 13, 3, 11, 12, 8, 7]),
array([11, 12, 5, 4, 3, 8, 7, 9, 13, 10, 6]),
array([ 8, 13, 4, 3, 5, 11, 12, 10, 7, 6, 9]),
array([12, 8, 10, 9, 3, 5, 4, 6, 11, 7, 13]),
array([ 7, 8, 3, 5, 13, 12, 9, 4, 11, 6, 10]),
array([10, 13, 6, 3, 5, 4, 7, 8, 12, 9, 11]),
array([11, 10, 9, 5, 8, 6, 13, 7, 12, 3, 4]),
array([ 6, 3, 13, 10, 8, 5, 4, 11, 9, 12, 7]),
array([11, 5, 6, 13, 7, 3, 9, 10, 8, 4, 12])]