Advertisement
Guest User

Untitled

a guest
Dec 7th, 2016
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. def EventHist(db,dk): #db is a Shelve object of pandas dataframes, dk is a list of keys
  2. for dbKey in dk:
  3. hist,bins=fn(db[dbKey]) # this function is only thing that changes by event
  4. plt.semilogx(hist,bins,label=dbKey)
  5. db.sync()
  6. # bunch of other plot properties
  7. plt.show()
  8.  
  9. @EventHist
  10. def myEvent(df):
  11. return np.hist(df['foo'].values+df['bar'].values)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement