Question: Let's explore how firms vary across different industries based on the amount of leverage they have. Now, there are a 11 industry sectors in this
Let's explore how firms vary across different industries based on the amount of leverage they have. Now, there are a 11 industry sectors in this dataset and nearly 1,200 unique values of leverage, so let's do two things to simplify this analysis: We will only look at IT and industry sectors. We will consider firms as being either "low" or "high" leverage. First, make a new variable ("high_leverage") equal to one if the firm has leverage above its industry median, and zero if it is below. Note: This variable should be blank if the firm doesn't have a value for leverage. Hint: firms_df[['leverage','high_leverage']].count() should produce the same number of non-missing values for each variable. If not, you need to adjust or augment the code that creates high_leverage so that it is blank (NaN) if leverage is blank. Second, filter the data so you only have firms in the IT and industry sectors. Now, we have four types of firms: High leverage firms in the IT sector High leverage firms in the industry sector Low leverage firms (high_leverage=0) in the IT sector Low leverage firms (high_leverage=0) in the industry sector
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
