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