Guest User

Untitled

a guest
Jun 20th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. df1[3] = np.where(df1[2] > 3, df1[2] + 5, df1[2])
  2.  
  3. df1[3] = df1[2]
  4. df1.loc[df1[2] > 3, 3] = df1[2] + 5
  5.  
  6. print(df1)
  7.  
  8. 0 1 2 3
  9. 0 1 2 3 3
  10. 1 5 7 8 13
  11. 2 2 5 4 9
Add Comment
Please, Sign In to add comment