fraud-detection-handbook icon indicating copy to clipboard operation
fraud-detection-handbook copied to clipboard

Add iloc for indexing when getting terminal ID

Open ray-p144 opened this issue 2 years ago • 0 comments

The line:

transactions_df[transactions_df.TX_FRAUD==1].TERMINAL_ID.iloc[0]

Fails if the transaction with an index of 0 within transactions_df is not identified as fraudulent.

I also updated the code from transactions_df.TX_FRAUD==0 to transactions_df.TX_FRAUD==1 to reflect the text and changed the output to the correct value of 3059.

The following cell used the correct TERMINAL_ID of 3059, so no further changes were required.

ray-p144 avatar Dec 25 '22 01:12 ray-p144