Exercise

Compute relative difference by industry

Computing the relative difference between a company's ratio and its industry average is an excellent way to see if a company is at par with its peers. In this exercise, you'll practice computing the relative difference of the equity multiplier ratio of various FMCG companies from their industry average.

A pandas DataFrame balance_sheet has been loaded for you. pandas has been loaded for you under the alias pd. You can call balance_sheet.columns in the console to assess which columns you can use for the exercise.

Instructions

100 XP
  • Subset the entries in balance_sheet to get only fmcg companies in the column "comp_type" of balance_sheet.
  • Add a column in fcmg where you compute the equity multiplier ratio.
  • Add a column to fmcg where you compute the average yearly equity multiplier ratio.
  • Add a column to fmcg where you compute the relative difference of the company's equity multiplier ratio with its industry average.