问题
I want to rewrite this code whithout for loops.
for x in range(round(len(data)/128)):
for i in range(128):
data.iloc[x*128 , i*24:(i+1)*24] = data.iloc[(x*128)+i , 0:24].values
This code moves data of 128 rows to one row(move index 1:127 -> index 0) and (index 128:255 -> index 128) and ...)). How can I rewrite it optimally?
来源:https://stackoverflow.com/questions/58141412/how-can-i-rewrite-this-code-without-for-loop