def evolveAvgPosFromCenter(df): SEPs = np.zeros(shape=(df.shape[0], 3)) times = df['Time'].values for itr, frame in tqdm(df.iterrows(), total=df.shape[0]): SEPs[itr] = getAvgPosFromCenter(frame) return SEPs, times