Closed. This question needs
CodePudding user response:
I think this is what you want:
vectors = []
extract = True
i_start = 0
while(extract):
vector = df.iloc[i_start:i_start 512].values
i_start =512
vectors.append(vector)
if i_start > len(df):
extract=False
CodePudding user response:
if you want to subset by increments you can do this:
[d for _, d in df.groupby(np.arange(df.shape[0]) // 512)]