Advertisement
Guest User

Untitled

a guest
Oct 8th, 2015
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. date_time value member
  2. 2013-10-09 09:00:00 664639 Jerome
  3. 2013-10-09 09:05:00 197290 Hence
  4. 2013-10-09 09:10:00 470186 Ann
  5. 2013-10-09 09:15:00 181314 Mikka
  6. 2013-10-09 09:20:00 969427 Cristy
  7. 2013-10-09 09:25:00 261473 James
  8. 2013-10-09 09:30:00 003698 Oliver
  9.  
  10. date_start date_end
  11. 2013-10-09 09:19:00 2013-10-09 09:25:00
  12. 2013-10-09 09:25:00 2013-10-09 09:40:00
  13.  
  14. def create_interval():
  15. intervals=[]
  16. for i in range(1,len(bounds)):
  17. for j in range(1, len(df)):
  18. mask[i] = df[(df['date'][j] > bounds.date_start[i]) & (df['date'][j] < bounds.date_end[i])]
  19. df_interval[i]=df.loc[mask[i]]
  20. intervals.append(df_interval.values)
  21. return intervals
  22.  
  23. pandas/index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:3824)()
  24.  
  25. pandas/index.pyx in pandas.index.IndexEngine.get_loc (pandas/index.c:3704)()
  26.  
  27. pandas/hashtable.pyx in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12280)()
  28.  
  29. pandas/hashtable.pyx in pandas.hashtable.PyObjectHashTable.get_item (pandas/hashtable.c:12231)()
  30.  
  31. KeyError: False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement