Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

100 Question 3.5. Create new table called with_previous_compensation. It should be a copy of compensation, but with the (No previous year) CEOs filtered out, and

image text in transcribed

100 Question 3.5. Create new table called with_previous_compensation. It should be a copy of compensation, but with the "(No previous year)" CEOs filtered out, and with an extra column called 2014 Total Pay ($). That column should have each CEO's pay in 2014. Hint 1: You can print out your results after each step to make sure you're on the right track. Hint 2: We've provided a structure that you can use to get to the answer. However, if it's confusing, feel free to delete the current structure and approach the problem your own way! [ ]: # Definition to turn percent to number def percent_string_to_num(percent_string): "Converts a percentage string to a number." return float(percent_string.strip("")) # Compensation table where there is a previous year having_previous_year = comensation.where("% Change", are.not_equal_to("(No previos year)")) # Get the percent changes as numbers instead of strings # We're still working off the table having_previous_year percent_changes = having_previous_year.apply(percent_string_to_num,'% Change") # Calculate the previous year's pay # We're still working off the table having_previous_year previous_pay = # Put the previous pay column into the having_previous_year table with_previous_compensation = ... with_previous_compensation [ ]: grader.check("435")

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design And Implementation

Authors: Edward Sciore

2nd Edition

3030338355, 978-3030338350

More Books

Students also viewed these Databases questions

Question

What is the Definition for Third Normal Form?

Answered: 1 week ago

Question

Provide two examples of a One-To-Many relationship.

Answered: 1 week ago