Guest User

Untitled

a guest
Mar 20th, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. def post_hdfc(r):
  2. if (r['balance_dt']>= pd.to_datetime('2017-06-01')) & (r['balance_dt']<= pd.to_datetime('2017-06-30')):
  3. return r['balance_am_01'].sum()
  4. if (r['balance_dt']>= pd.to_datetime('2017-07-01')) & (r['balance_dt']<= pd.to_datetime('2017-07-31')):
  5. return r[['balance_am_01','balance_am_02']].sum()
  6. df_hdfctoobc['hdfc_post_spend'] = df_hdfctoobc.apply(post_hdfc,axis=1)
  7.  
  8. w
Add Comment
Please, Sign In to add comment