Challenge: Flag Suspicious Transactions
Завдання
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.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 3. Розділ 3
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Suggested prompts:
Can you explain this in simpler terms?
What are the next steps I should take?
Can you provide an example?
Чудово!
Completion показник покращився до 4.76
Challenge: Flag Suspicious Transactions
Свайпніть щоб показати меню
Завдання
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.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 3. Розділ 3
single