Challenge: Flag Suspicious Transactions
Tarea
Swipe to start coding
Given a DataFrame of transactions, your task is to flag suspicious transactions based on the amount column.
- Calculate the mean of the
amountcolumn. - Calculate the standard deviation of the
amountcolumn. - Flag any transaction as suspicious if its amount is more than 2 standard deviations away from the mean.
- Add a new column called
suspiciousto the DataFrame, where each value isTrueif the transaction is suspicious andFalseotherwise. - Return the updated DataFrame.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 3. Capítulo 3
single
Pregunte a AI
Pregunte a AI
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 next steps I should take?
Can you provide an example?
Genial!
Completion tasa mejorada a 4.76
Challenge: Flag Suspicious Transactions
Desliza para mostrar el menú
Tarea
Swipe to start coding
Given a DataFrame of transactions, your task is to flag suspicious transactions based on the amount column.
- Calculate the mean of the
amountcolumn. - Calculate the standard deviation of the
amountcolumn. - Flag any transaction as suspicious if its amount is more than 2 standard deviations away from the mean.
- Add a new column called
suspiciousto the DataFrame, where each value isTrueif the transaction is suspicious andFalseotherwise. - Return the updated DataFrame.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 3. Capítulo 3
single