Is Our Project Profitable? ROI 1/2
Is our project profitable? To figure this out, you can calculate one simple metric titled ROI; the formula is:

- Earnings, the sum of the column
'money_spent'. - Losses, the sum of the column
'cost'.
Tarea
Swipe to start coding
- Calculate the sum of the column
df['cost'], and assign it to the variablecost_sum. - Calculate the sum of the column
df['money_spent'], and assign it to the variablespent_sum. - Calculate
ROI:
- Subtract
cost_sumfrom thespent_sum. - Divide the subtraction by the
cost_sum.
- Output the
ROI.
The result was already multiplied by 100 to get it in percentage.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 4. Capítulo 9
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Suggested prompts:
Resumir este capítulo
Explicar el código en file
Explicar por qué file no resuelve la tarea
Awesome!
Completion rate improved to 2.08
Is Our Project Profitable? ROI 1/2
Desliza para mostrar el menú
Is our project profitable? To figure this out, you can calculate one simple metric titled ROI; the formula is:

- Earnings, the sum of the column
'money_spent'. - Losses, the sum of the column
'cost'.
Tarea
Swipe to start coding
- Calculate the sum of the column
df['cost'], and assign it to the variablecost_sum. - Calculate the sum of the column
df['money_spent'], and assign it to the variablespent_sum. - Calculate
ROI:
- Subtract
cost_sumfrom thespent_sum. - Divide the subtraction by the
cost_sum.
- Output the
ROI.
The result was already multiplied by 100 to get it in percentage.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 4. Capítulo 9
single