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