Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- df_users.groupby(['userID', 'requestDate']).apply(feature_rollup)
- def logged_apply(g, func, *args, **kwargs):
- step_percentage = 100. / len(g)
- import sys
- sys.stdout.write('apply progress: 0%')
- sys.stdout.flush()
- def logging_decorator(func):
- def wrapper(*args, **kwargs):
- progress = wrapper.count * step_percentage
- sys.stdout.write('