Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add iloc for indexing when getting terminal ID #7

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ray-p144
Copy link

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.

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. 

Additionally, the line was updated from `transactions_df.TX_FRAUD==0` to `transactions_df.TX_FRAUD==1` and the correct value of `3059` was updated for the output
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant