Challenge: Flag Suspicious Transactions
Tehtävä
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.
Ratkaisu
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 3. Luku 3
single
Kysy tekoälyä
Kysy tekoälyä
Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme
Suggested prompts:
Can you explain this in simpler terms?
What are the next steps I should take?
Can you provide an example?
Mahtavaa!
Completion arvosana parantunut arvoon 4.76
Challenge: Flag Suspicious Transactions
Pyyhkäise näyttääksesi valikon
Tehtävä
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.
Ratkaisu
Oliko kaikki selvää?
Kiitos palautteestasi!
Osio 3. Luku 3
single