daily pastebin goal
80%
SHARE
TWEET

Untitled

a guest Dec 14th, 2018 50 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. df = pd.DataFrame({'a':[166,34,12,56],
  2.                'b': [27.9625,24.6825,32.738,45.344]})
  3.  
  4. print df
  5. print (df['a']*df['b'])
  6. print (df['a']*df['b']).round(2)
  7.    
  8. a        b
  9. 0  166  27.9625
  10. 1   34  24.6825
  11. 2   12  32.7380
  12. 3   56  45.3440
  13. 0    4641.775
  14. 1     839.205
  15. 2     392.856
  16. 3    2539.264
  17. dtype: float64
  18. 0    4641.77
  19. 1     839.20
  20. 2     392.86
  21. 3    2539.26
  22. dtype: float64
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top