bug fix: with column count

dev
Steve L. Nyemba 5 years ago
parent b8f59f85d5
commit 02d8588f5b

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

Loading…
Cancel
Save