Exercise

Plotting ratios

The gross margin ratio is an important profitability ratio that assesses a company's ability to earn profits from its sales. The asset turnover ratio is an important efficiency ratio that measures how efficiently a company is using its assets.

In this exercise, you'll plot and compute the gross margin and asset turnover ratio of Microsoft over time. This will help visually analyze the trend of these ratios for Microsoft: are these ratios constant, improving over time, volatile, or worsening? Let's find out!

Unlike using Seaborn to plot bar plots which we learned in the video, you will be using seaborn to make a line plot. Making a line plot with Seaborn only involves changing the sns.barplot to sns.lineplot. The rest of the arguments remain the same.

A DataFrame called msft has been loaded for you, along with pandas as pd and Seaborn as sns. You can run print(msft.columns) in the console to see the columns to use for this exercise.

Instructions 1/2

undefined XP
    1
    2
  • Compute asset turnover ratio.
  • Compute gross margin ratio.