1. Learn
  2. /
  3. Courses
  4. /
  5. Introduction to Python for Finance

Exercise

Plot P/E ratios

Let's take a closer look at the P/E ratios using a scatter plot for each company in these two sectors.

The arrays it_pe and cs_pe from the previous exercise are available in your workspace. Also, each company name has been assigned a numeric ID contained in the arrays it_id and cs_id.

Instructions

100 XP
  • Draw a scatter plot of it_pe ratios with red markers and 'IT' label.
  • On the same plot, add the cs_pe ratios with green markers and 'CS' label.
  • Add a legend to this plot.
  • Display the plot.