Question

Suppose that we didn't drop the missing incomes. What will running df['income'].mean() output

Please answer question 2C and 2D.

Thank you!

Question 2c: Note that we can now compute the average income. If your df variable contains the right values, dflincome ].me

0 0
Add a comment Improve this question Transcribed image text
Answer #1

in question 2c. option d is correct. the statement df['income'].mean() would just ignore the nan values and compute the mean with the remaining values.

for example, in the below picture, column A, B and D has some nan values but the mean is calculated using the remaining values.

In [15]: 1 import pandas as pd 2 df pd.DataFrame([A: [17, 4, 5, None, 1], B:(7, 2, 34, 3, None], C: [20, 57, 11, 3, 8],

Add a comment
Know the answer?
Add Answer to:
Suppose that we didn't drop the missing incomes. What will running df['income'].mean() output Please answer question 2C and 2D. Thank you! Question 2c: Note that we can now compute the av...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Please answer and explain thank you. Question 1 What will be printed when the following code...

    Please answer and explain thank you. Question 1 What will be printed when the following code is executed? double x = 45678.259; System.out.printf("%,.2f", x); Group of answer choices 45678.259 0,045,678.26 45,678.26 45,678.3 Question 2 What will be printed when the following code is executed? double x = 45678.259; String output = String.format("%,.1f", x); System.out.println(output); Group of answer choices 45678.259 45,678.259 45,678.26 45,678.3 Question 3 What will be the value of ans after the following code has been executed? int ans=0;...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT