SHARE
TWEET

Untitled

a guest Jun 15th, 2019 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. pd.crosstab(data_2019.HOUR, data_2019.DAY_OF_WEEK)
  2.      
  3. DAY_OF_WEEK Friday  Monday  Saturday    Sunday  Thursday    Tuesday Wednesday
  4. HOUR                            
  5. 0   204 255 256 260 225 222 192
  6. 1   121 111 198 230 116 117 145
  7. 2   128 90  217 222 84  111 96
  8.      
  9. days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday',
  10.         'Friday', 'Saturday', 'Sunday']
  11.  
  12. c = pd.crosstab(...)
  13.      
  14. c = c[days]
  15.      
  16. c = c.reindex(days, axis="columns")
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