Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
ROI 2/2 | Becoming an Analyst
Introduction to Python for Data Analysis
course content

Course Content

Introduction to Python for Data Analysis

Introduction to Python for Data Analysis

1. Introduction to Python 1/2
2. Introduction to Python 2/2
3. Explore Dataset
4. Becoming an Analyst

ROI 2/2

As you can recognize from the previous chapter, we have some problems with ROI in general; we received -19.644756245106056%. Unfortunately, we suffer losses. In this case, we must dive deeper and find the reason.

The next step of our research is to check if we have unprofitable days.

Task

  1. Group data:
  • Extract only columns 'day', 'cost', 'money_spent' from the df DataFrame.
  • Group by the column 'day'.
  • Apply sum() function to grouped data.
  • Apply reset_index() function.
  1. Create column 'ROI':
  • Subtract df['cost'] from df['money_spent']
  • Divide the result by df['cost'].

Task

  1. Group data:
  • Extract only columns 'day', 'cost', 'money_spent' from the df DataFrame.
  • Group by the column 'day'.
  • Apply sum() function to grouped data.
  • Apply reset_index() function.
  1. Create column 'ROI':
  • Subtract df['cost'] from df['money_spent']
  • Divide the result by df['cost'].

Everything was clear?

Section 4. Chapter 10
toggle bottom row

ROI 2/2

As you can recognize from the previous chapter, we have some problems with ROI in general; we received -19.644756245106056%. Unfortunately, we suffer losses. In this case, we must dive deeper and find the reason.

The next step of our research is to check if we have unprofitable days.

Task

  1. Group data:
  • Extract only columns 'day', 'cost', 'money_spent' from the df DataFrame.
  • Group by the column 'day'.
  • Apply sum() function to grouped data.
  • Apply reset_index() function.
  1. Create column 'ROI':
  • Subtract df['cost'] from df['money_spent']
  • Divide the result by df['cost'].

Task

  1. Group data:
  • Extract only columns 'day', 'cost', 'money_spent' from the df DataFrame.
  • Group by the column 'day'.
  • Apply sum() function to grouped data.
  • Apply reset_index() function.
  1. Create column 'ROI':
  • Subtract df['cost'] from df['money_spent']
  • Divide the result by df['cost'].

Everything was clear?

Section 4. Chapter 10
toggle bottom row

ROI 2/2

As you can recognize from the previous chapter, we have some problems with ROI in general; we received -19.644756245106056%. Unfortunately, we suffer losses. In this case, we must dive deeper and find the reason.

The next step of our research is to check if we have unprofitable days.

Task

  1. Group data:
  • Extract only columns 'day', 'cost', 'money_spent' from the df DataFrame.
  • Group by the column 'day'.
  • Apply sum() function to grouped data.
  • Apply reset_index() function.
  1. Create column 'ROI':
  • Subtract df['cost'] from df['money_spent']
  • Divide the result by df['cost'].

Task

  1. Group data:
  • Extract only columns 'day', 'cost', 'money_spent' from the df DataFrame.
  • Group by the column 'day'.
  • Apply sum() function to grouped data.
  • Apply reset_index() function.
  1. Create column 'ROI':
  • Subtract df['cost'] from df['money_spent']
  • Divide the result by df['cost'].

Everything was clear?

As you can recognize from the previous chapter, we have some problems with ROI in general; we received -19.644756245106056%. Unfortunately, we suffer losses. In this case, we must dive deeper and find the reason.

The next step of our research is to check if we have unprofitable days.

Task

  1. Group data:
  • Extract only columns 'day', 'cost', 'money_spent' from the df DataFrame.
  • Group by the column 'day'.
  • Apply sum() function to grouped data.
  • Apply reset_index() function.
  1. Create column 'ROI':
  • Subtract df['cost'] from df['money_spent']
  • Divide the result by df['cost'].

Section 4. Chapter 10
Switch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt