Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Lernen Is Our Project Profitable? ROI 1/2 | Becoming an Analyst
Introduction to Python for Data Analysis

Swipe um das Menü anzuzeigen

book
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:

roi

  • Earnings , the sum of the column 'money_spent' .

  • Losses , the sum of the column 'cost' .

Aufgabe

Swipe to start coding

  1. Calculate the sum of the column df['cost'], and assign it to the variable cost_sum.
  2. Calculate the sum of the column df['money_spent'], and assign it to the variable spent_sum.
  3. Calculate ROI:
  • Subtract cost_sum from the spent_sum.
  • Divide the subtraction by the cost_sum.
  1. Output the ROI.

The result was already multiplied by 100 to get it in percentage.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 4. Kapitel 9

Fragen Sie AI

expand
ChatGPT

Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen

book
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:

roi

  • Earnings , the sum of the column 'money_spent' .

  • Losses , the sum of the column 'cost' .

Aufgabe

Swipe to start coding

  1. Calculate the sum of the column df['cost'], and assign it to the variable cost_sum.
  2. Calculate the sum of the column df['money_spent'], and assign it to the variable spent_sum.
  3. Calculate ROI:
  • Subtract cost_sum from the spent_sum.
  • Divide the subtraction by the cost_sum.
  1. Output the ROI.

The result was already multiplied by 100 to get it in percentage.

Lösung

Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
War alles klar?

Wie können wir es verbessern?

Danke für Ihr Feedback!

Abschnitt 4. Kapitel 9
Switch to desktopWechseln Sie zum Desktop, um in der realen Welt zu übenFahren Sie dort fort, wo Sie sind, indem Sie eine der folgenden Optionen verwenden
Wir sind enttäuscht, dass etwas schief gelaufen ist. Was ist passiert?
some-alt