Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def post_hdfc(r):
- if (r['balance_dt']>= pd.to_datetime('2017-06-01')) & (r['balance_dt']<= pd.to_datetime('2017-06-30')):
- return r['balance_am_01'].sum()
- if (r['balance_dt']>= pd.to_datetime('2017-07-01')) & (r['balance_dt']<= pd.to_datetime('2017-07-31')):
- return r[['balance_am_01','balance_am_02']].sum()
- df_hdfctoobc['hdfc_post_spend'] = df_hdfctoobc.apply(post_hdfc,axis=1)
- w
Add Comment
Please, Sign In to add comment