Created
March 7, 2020 20:24
-
-
Save Paulooh007/aae8e7ee644c55a2afc926791da3efca to your computer and use it in GitHub Desktop.
feat eng 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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