Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
The Most Profitable Holiday | Analyzing Data
Analyzing and Visualizing Real-World Data
course content

Conteúdo do Curso

Analyzing and Visualizing Real-World Data

Analyzing and Visualizing Real-World Data

1. Preprocessing Data: Part I
2. Preprocessing Data: Part II
3. Analyzing Data
4. Visualizing Data

bookThe Most Profitable Holiday

Let's find out which exact holiday was the most profitable according to sales. To do this, we will need to replace the dates with respective labels of holidays, so that we can group by a certain holiday. But all of the holidays have different dates in the data, so we need to perform a replacement first and then group by the new values. We have gathered the dates and their respective holidays in the holidays_dates dictionary (keys are dates, and values are the names of the holidays).

Tarefa

  1. Replace the values in the 'Date' column using the holidays_dates dictionary. Overwrite the original dataframe.
  2. Filter the data in the df DataFrame that satisfies the following conditions: these are holiday data (the 'Holiday_Flag' column is equal to 1) or 'Pre-Christmas' value within the 'Date' column. Save the resulting data in the data variable.
  3. Group values in the data dataframe by the 'Date' column, select the 'Weekly_Sales' column, and calculate the mean and median of the chosen column.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 9
toggle bottom row

bookThe Most Profitable Holiday

Let's find out which exact holiday was the most profitable according to sales. To do this, we will need to replace the dates with respective labels of holidays, so that we can group by a certain holiday. But all of the holidays have different dates in the data, so we need to perform a replacement first and then group by the new values. We have gathered the dates and their respective holidays in the holidays_dates dictionary (keys are dates, and values are the names of the holidays).

Tarefa

  1. Replace the values in the 'Date' column using the holidays_dates dictionary. Overwrite the original dataframe.
  2. Filter the data in the df DataFrame that satisfies the following conditions: these are holiday data (the 'Holiday_Flag' column is equal to 1) or 'Pre-Christmas' value within the 'Date' column. Save the resulting data in the data variable.
  3. Group values in the data dataframe by the 'Date' column, select the 'Weekly_Sales' column, and calculate the mean and median of the chosen column.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 3. Capítulo 9
toggle bottom row

bookThe Most Profitable Holiday

Let's find out which exact holiday was the most profitable according to sales. To do this, we will need to replace the dates with respective labels of holidays, so that we can group by a certain holiday. But all of the holidays have different dates in the data, so we need to perform a replacement first and then group by the new values. We have gathered the dates and their respective holidays in the holidays_dates dictionary (keys are dates, and values are the names of the holidays).

Tarefa

  1. Replace the values in the 'Date' column using the holidays_dates dictionary. Overwrite the original dataframe.
  2. Filter the data in the df DataFrame that satisfies the following conditions: these are holiday data (the 'Holiday_Flag' column is equal to 1) or 'Pre-Christmas' value within the 'Date' column. Save the resulting data in the data variable.
  3. Group values in the data dataframe by the 'Date' column, select the 'Weekly_Sales' column, and calculate the mean and median of the chosen column.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Let's find out which exact holiday was the most profitable according to sales. To do this, we will need to replace the dates with respective labels of holidays, so that we can group by a certain holiday. But all of the holidays have different dates in the data, so we need to perform a replacement first and then group by the new values. We have gathered the dates and their respective holidays in the holidays_dates dictionary (keys are dates, and values are the names of the holidays).

Tarefa

  1. Replace the values in the 'Date' column using the holidays_dates dictionary. Overwrite the original dataframe.
  2. Filter the data in the df DataFrame that satisfies the following conditions: these are holiday data (the 'Holiday_Flag' column is equal to 1) or 'Pre-Christmas' value within the 'Date' column. Save the resulting data in the data variable.
  3. Group values in the data dataframe by the 'Date' column, select the 'Weekly_Sales' column, and calculate the mean and median of the chosen column.

Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
Seção 3. Capítulo 9
Switch to desktopMude para o desktop para praticar no mundo realContinue de onde você está usando uma das opções abaixo
some-alt