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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 23.06.2019 09:00, paulusl19
The first screen you see when you open word2016 what is called?
Answers: 1
image
Computers and Technology, 23.06.2019 15:30, PlzNoToxicBan
The song about casey jones a railroad engineer who gives his life on the job would most likely gall under the folk song category of? a-work song b-nonsense song c-religious song d-ballad
Answers: 1
image
Computers and Technology, 23.06.2019 21:50, Trinhphuongtran
Description: write function lastfirst() that takes one argument—a list of strings of the format "lastname, firstname" —and returns a list consisting of two lists: (a) a list of all the last names (b) a list of all the first names
Answers: 2
image
Computers and Technology, 25.06.2019 01:20, 11232003
Jason typically uses the internet to buy various items. it the total cost of all of the items ordered, at one time, is $250 or more, then the shipping and handling is free, otherwise the shipping and handling is $15 per item. design an algorithm that prompts jason to enter the number of items ordered and the price of each item. (remember cost = number of items order times price) the algorithm then outputs the total billing amount including shipping and handling. your algorithm must use a loop (repetition structure) to get the number and price of each item. write this in algorithm format not program code format.
Answers: 2
You know the right answer?
Consider a DataFrame named df with columns named P2010, P2011, P2012, P2013, 2014 and P2015 containi...

Questions in other subjects:

Konu
Mathematics, 29.05.2020 20:02