Question: Python Help! Imagine a data set that contains a gender column with male and female, and a second column for their heights. Using the skeleton

Python Help! Imagine a data set that contains a gender column with male and female, and a second column for their heights. Using the skeleton code below, write a code that gets the proportion of the population that is MALE and who have a height greater than or equal to the given "height". Your answer must also return the probability that a male in the dataset will be taller than the given "height". Do not use any other library except Pandas.

def get_probability_average_height_greater_than_height(self, df): probability = r.random() height = self.height

# code that assigns a value to probability # write the equation, do not use any library other than pandas # return only those who are taller than height

 return probability

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!