|
|
|
@ -155,13 +155,13 @@ class Components :
|
|
|
|
|
# df = reader()
|
|
|
|
|
df = args['reader']() if 'reader' in args else args['data']
|
|
|
|
|
|
|
|
|
|
if 'slice' in args and 'max_rows' in args['slice']:
|
|
|
|
|
# if 'slice' in args and 'max_rows' in args['slice']:
|
|
|
|
|
|
|
|
|
|
max_rows = args['slice']['max_rows']
|
|
|
|
|
if df.shape[0] > max_rows :
|
|
|
|
|
print (".. slicing ")
|
|
|
|
|
i = np.random.choice(df.shape[0],max_rows,replace=False)
|
|
|
|
|
df = df.iloc[i]
|
|
|
|
|
# max_rows = args['slice']['max_rows']
|
|
|
|
|
# if df.shape[0] > max_rows :
|
|
|
|
|
# print (".. slicing ")
|
|
|
|
|
# i = np.random.choice(df.shape[0],max_rows,replace=False)
|
|
|
|
|
# df = df.iloc[i]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|