Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Costly Customers | Becoming an Analyst
Introduction to Python for Data Analysis
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

Costly Customers

Sometimes we don't receive as much as we spend. The same with some customers in our DataFrame. We do spend more money to 'buy' this customer, but we don't receive the the same amount of money.

Let's find the percentage of these customers!

We want to find costly customers, not payments. To do that, we need to add additional customer_id.nunique() that will find only unique customers with their costly (or not) payments.

To find the percentage, use the next formula:

Завдання

  1. Count the number of the costly customers:
  • Set the condition if the value in the 'cost' column is greater than the value in the 'money_spent' column
  • Use unique customers to find the metric
  1. Print the number of the costly customers.
  2. Find the percentage of costly customers using the formula.
  3. Print the result of countings in the 0.00 format.

Завдання

  1. Count the number of the costly customers:
  • Set the condition if the value in the 'cost' column is greater than the value in the 'money_spent' column
  • Use unique customers to find the metric
  1. Print the number of the costly customers.
  2. Find the percentage of costly customers using the formula.
  3. Print the result of countings in the 0.00 format.

Все було зрозуміло?

Секція 4. Розділ 6
toggle bottom row

Costly Customers

Sometimes we don't receive as much as we spend. The same with some customers in our DataFrame. We do spend more money to 'buy' this customer, but we don't receive the the same amount of money.

Let's find the percentage of these customers!

We want to find costly customers, not payments. To do that, we need to add additional customer_id.nunique() that will find only unique customers with their costly (or not) payments.

To find the percentage, use the next formula:

Завдання

  1. Count the number of the costly customers:
  • Set the condition if the value in the 'cost' column is greater than the value in the 'money_spent' column
  • Use unique customers to find the metric
  1. Print the number of the costly customers.
  2. Find the percentage of costly customers using the formula.
  3. Print the result of countings in the 0.00 format.

Завдання

  1. Count the number of the costly customers:
  • Set the condition if the value in the 'cost' column is greater than the value in the 'money_spent' column
  • Use unique customers to find the metric
  1. Print the number of the costly customers.
  2. Find the percentage of costly customers using the formula.
  3. Print the result of countings in the 0.00 format.

Все було зрозуміло?

Секція 4. Розділ 6
toggle bottom row

Costly Customers

Sometimes we don't receive as much as we spend. The same with some customers in our DataFrame. We do spend more money to 'buy' this customer, but we don't receive the the same amount of money.

Let's find the percentage of these customers!

We want to find costly customers, not payments. To do that, we need to add additional customer_id.nunique() that will find only unique customers with their costly (or not) payments.

To find the percentage, use the next formula:

Завдання

  1. Count the number of the costly customers:
  • Set the condition if the value in the 'cost' column is greater than the value in the 'money_spent' column
  • Use unique customers to find the metric
  1. Print the number of the costly customers.
  2. Find the percentage of costly customers using the formula.
  3. Print the result of countings in the 0.00 format.

Завдання

  1. Count the number of the costly customers:
  • Set the condition if the value in the 'cost' column is greater than the value in the 'money_spent' column
  • Use unique customers to find the metric
  1. Print the number of the costly customers.
  2. Find the percentage of costly customers using the formula.
  3. Print the result of countings in the 0.00 format.

Все було зрозуміло?

Sometimes we don't receive as much as we spend. The same with some customers in our DataFrame. We do spend more money to 'buy' this customer, but we don't receive the the same amount of money.

Let's find the percentage of these customers!

We want to find costly customers, not payments. To do that, we need to add additional customer_id.nunique() that will find only unique customers with their costly (or not) payments.

To find the percentage, use the next formula:

Завдання

  1. Count the number of the costly customers:
  • Set the condition if the value in the 'cost' column is greater than the value in the 'money_spent' column
  • Use unique customers to find the metric
  1. Print the number of the costly customers.
  2. Find the percentage of costly customers using the formula.
  3. Print the result of countings in the 0.00 format.

Секція 4. Розділ 6
Перейдіть на комп'ютер для реальної практикиПродовжуйте з того місця, де ви зупинились, використовуючи один з наведених нижче варіантів
We're sorry to hear that something went wrong. What happened?
some-alt