Advertisement
arthurcluet

Untitled

Oct 1st, 2022
880
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.27 KB | None | 0 0
  1. ndf = pd.DataFrame(columns=['temps', 'voltage'])
  2. #ndf = ndf.append({"temps": 1, "voltage":2}, ignore_index=True)
  3. n = 1000
  4. for i in range(0, len(df), n):
  5.     ndf = ndf.append({"temps": df.iloc[i:i+n].temps.mean(), "voltage": df.iloc[i:i+n].voltage.mean()}, ignore_index=True)
  6.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement