Skip to content

Instantly share code, notes, and snippets.

@Paulooh007
Created March 7, 2020 20:24
Show Gist options
  • Save Paulooh007/aae8e7ee644c55a2afc926791da3efca to your computer and use it in GitHub Desktop.
Save Paulooh007/aae8e7ee644c55a2afc926791da3efca to your computer and use it in GitHub Desktop.
feat eng 2
#Getting the recent amount withdrawn or deposited
train['prev_tran'] = train['current bank amount'] - train['last bank amount']
#credit if the value is positive or debit if otherwise
train['credit_or_debit'] = ['credit' if x > 0 else 'debit' for x in train['prev_tran'] ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment