Guest User

Untitled

a guest
Jan 17th, 2019
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. x = pd.Series([1, 2, 3, 4, 5])
  2. y = pd.Series([1, 2, 3, 4, 5])
  3. z = pd.Series([1, 2, 3, 4, 5])
  4.  
  5. df = pd.DataFrame({"A": x, "B": y, "C": z})
  6. df['max'] = df.loc[:,['A':'C']].rolling(3).max()
  7.  
  8. df
Add Comment
Please, Sign In to add comment