Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprende Challenge: Implement Compliance Flags | Automation and Fraud Detection in Banking
Practice
Projects
Quizzes & Challenges
Quizzes
Challenges
/
Python for Bankers

bookChallenge: Implement Compliance Flags

Tarea

Swipe to start coding

Given a DataFrame of transactions, you need to identify which transactions should be flagged for compliance review. A transaction should be flagged if its amount is greater than $10,000 or if its country is in the provided list of high-risk countries. You must add a new column called compliance_flag to the DataFrame, indicating with True or False whether each transaction is flagged. After updating the DataFrame, print a summary statement showing how many transactions were flagged out of the total.

Conceptual steps:

  • Add a compliance_flag column to the DataFrame.
  • Set compliance_flag to True for transactions where the amount is greater than $10,000 or the country is in the high-risk list.
  • Set compliance_flag to False for all other transactions.
  • Print a summary statement showing the number of flagged transactions and the total number of transactions.

Solución

¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 3. Capítulo 7
single

single

Pregunte a AI

expand

Pregunte a AI

ChatGPT

Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla

Suggested prompts:

Can you explain this in simpler terms?

What are the main takeaways from this?

Can you give me an example?

close

bookChallenge: Implement Compliance Flags

Desliza para mostrar el menú

Tarea

Swipe to start coding

Given a DataFrame of transactions, you need to identify which transactions should be flagged for compliance review. A transaction should be flagged if its amount is greater than $10,000 or if its country is in the provided list of high-risk countries. You must add a new column called compliance_flag to the DataFrame, indicating with True or False whether each transaction is flagged. After updating the DataFrame, print a summary statement showing how many transactions were flagged out of the total.

Conceptual steps:

  • Add a compliance_flag column to the DataFrame.
  • Set compliance_flag to True for transactions where the amount is greater than $10,000 or the country is in the high-risk list.
  • Set compliance_flag to False for all other transactions.
  • Print a summary statement showing the number of flagged transactions and the total number of transactions.

Solución

Switch to desktopCambia al escritorio para practicar en el mundo realContinúe desde donde se encuentra utilizando una de las siguientes opciones
¿Todo estuvo claro?

¿Cómo podemos mejorarlo?

¡Gracias por tus comentarios!

Sección 3. Capítulo 7
single

single

some-alt