subject

Consider a DataFrame named df with columns named P2010, P2011, P2012, P2013, 2014 and P2015 containing float values. We want to use the apply method to get a new DataFrame named result_df with a new column AVG. The AVG column should average the float values across P2010 to P2015. The apply method should also remove the 6 original columns (P2010 to P2015). For that, what should be the value of x and y in the given code? frames = ['P2010', 'P2011', 'P2012', 'P2013', 'P2014', 'P2015']
df['AVG'] = df[frames ].apply(lambda z: np. mean(z), axis=x)
result_df df. drop(frames, axis=y)
a. x = 1 y = 0.
b. x = 1 y = 1.
c. x = 0 y = 1.
d. x = 0 y = 0.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 09:00
Which best describes the condition under which the unicode output is the same as plain text?
Answers: 3
question
Computers and Technology, 22.06.2019 23:30
What does 21 pilots middle aged name as a band 15 years prior to them naming their band 21 pilots?
Answers: 1
question
Computers and Technology, 23.06.2019 06:20
Which text function capitalizes the first letter in a string of text? question 10 options: upper capital first proper
Answers: 1
question
Computers and Technology, 24.06.2019 12:00
Match the function to its purpose. fast worth 50pts.
Answers: 1
You know the right answer?
Consider a DataFrame named df with columns named P2010, P2011, P2012, P2013, 2014 and P2015 containi...
Questions
question
Mathematics, 02.09.2019 04:50
question
Chemistry, 02.09.2019 04:50
question
Chemistry, 02.09.2019 04:50
Questions on the website: 13722367