Course Content
Analyzing and Visualizing Real-World Data
Analyzing and Visualizing Real-World Data
2. Preprocessing Data: Part II
Comparing Shops
As you can see, all of these points are related to the 'pre-Christmas' periods, as we noticed before. Now, let's use visualizing tools to compare the revenue for shops. We already know the top 5 selling stores, but are other shops significantly worse? We'll find out using a bar chart.
Task
- Prepare the data: group the values of the
df
DataFrame based on the'Store'
column, then select the'Weekly_Sales'
column, calculate sum values across groups, and reset the indexes. Save the result within thedata
variable. - Initialize a bar plot. Use the
'Store'
column values ofdata
for the x-axis,'Weekly_Sales'
for the y-axis, and make bars'blue'
. - Display the plot.
Task
- Prepare the data: group the values of the
df
DataFrame based on the'Store'
column, then select the'Weekly_Sales'
column, calculate sum values across groups, and reset the indexes. Save the result within thedata
variable. - Initialize a bar plot. Use the
'Store'
column values ofdata
for the x-axis,'Weekly_Sales'
for the y-axis, and make bars'blue'
. - Display the plot.
Everything was clear?
Comparing Shops
As you can see, all of these points are related to the 'pre-Christmas' periods, as we noticed before. Now, let's use visualizing tools to compare the revenue for shops. We already know the top 5 selling stores, but are other shops significantly worse? We'll find out using a bar chart.
Task
- Prepare the data: group the values of the
df
DataFrame based on the'Store'
column, then select the'Weekly_Sales'
column, calculate sum values across groups, and reset the indexes. Save the result within thedata
variable. - Initialize a bar plot. Use the
'Store'
column values ofdata
for the x-axis,'Weekly_Sales'
for the y-axis, and make bars'blue'
. - Display the plot.
Task
- Prepare the data: group the values of the
df
DataFrame based on the'Store'
column, then select the'Weekly_Sales'
column, calculate sum values across groups, and reset the indexes. Save the result within thedata
variable. - Initialize a bar plot. Use the
'Store'
column values ofdata
for the x-axis,'Weekly_Sales'
for the y-axis, and make bars'blue'
. - Display the plot.
Everything was clear?
Comparing Shops
As you can see, all of these points are related to the 'pre-Christmas' periods, as we noticed before. Now, let's use visualizing tools to compare the revenue for shops. We already know the top 5 selling stores, but are other shops significantly worse? We'll find out using a bar chart.
Task
- Prepare the data: group the values of the
df
DataFrame based on the'Store'
column, then select the'Weekly_Sales'
column, calculate sum values across groups, and reset the indexes. Save the result within thedata
variable. - Initialize a bar plot. Use the
'Store'
column values ofdata
for the x-axis,'Weekly_Sales'
for the y-axis, and make bars'blue'
. - Display the plot.
Task
- Prepare the data: group the values of the
df
DataFrame based on the'Store'
column, then select the'Weekly_Sales'
column, calculate sum values across groups, and reset the indexes. Save the result within thedata
variable. - Initialize a bar plot. Use the
'Store'
column values ofdata
for the x-axis,'Weekly_Sales'
for the y-axis, and make bars'blue'
. - Display the plot.
Everything was clear?
As you can see, all of these points are related to the 'pre-Christmas' periods, as we noticed before. Now, let's use visualizing tools to compare the revenue for shops. We already know the top 5 selling stores, but are other shops significantly worse? We'll find out using a bar chart.
Task
- Prepare the data: group the values of the
df
DataFrame based on the'Store'
column, then select the'Weekly_Sales'
column, calculate sum values across groups, and reset the indexes. Save the result within thedata
variable. - Initialize a bar plot. Use the
'Store'
column values ofdata
for the x-axis,'Weekly_Sales'
for the y-axis, and make bars'blue'
. - Display the plot.