Guest User

Untitled

a guest
Dec 15th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. ID,CLASS,DATE,MRK
  2. 1,321,02/12/2016,30
  3. 2,321,05/12/2016,40
  4. 3,321,06/12/2016,0
  5. 4,321,07/12/2016,60
  6. 5,321,10/12/2016,70
  7. 6,876,5/12/2016,100
  8. 7,876,7/12/2016,80
  9.  
  10. ID,CLASS,DATE,MRK
  11. 1,321,02/12/2016,30
  12. 2,321,03/12/2016,0
  13. 3,321,04/12/2016,0
  14. 4,321,05/12/2016,40
  15. 5,321,06/12/2016,0
  16. 6,321,07/12/2016,60
  17. 7,321,08/12/2016,0
  18. 8,321,09/12/2016,0
  19. 9,321,10/12/2016,70
  20. 10,876,5/12/2016,100
  21. 11,876,6/12/2016,0
  22. 12,876,7/12/2016,80
  23.  
  24. import pandas as pd
  25.  
  26. df = pd.read_csv('In.txt')
  27. resampled_df = df.resample('D').mean()
  28. print resampled_df
Add Comment
Please, Sign In to add comment