1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
frozen [14]
4 years ago
9

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.
Computers and Technology
1 answer:
My name is Ann [436]4 years ago
6 0

Answer:

x = 1 ; y = 1

Explanation:

The newly created AVG column will contain the mean value of all 6 columns(P2010, P2011, P2012, P2013, 2014 and P2015) this means that we are taking the mean across the columns as our AVG column have the same length as the initial lengtb of the data Frame as all a values in each index are averaged to create the new column. To achieve this the value 1 will be passed to the axis argument in the apply method.

To drop the previous 6 columns, we se the axis argument set to 1, this will delete the columns passed to the drop method.

Hence, both x and y values of the axis argument will take the value 1.

You might be interested in
____ are likely in the event of a hacker attack, when the attacker retreats to a chat room and describes in specific detail to h
Masja [62]

Answer:

Follow-on incidents.

Explanation:

When the hacker hacks something successfully and after that when he or she  discusses or describes the details to his or her associates and the method which he or she used to do the hacking is called Follow-on incidents because the hacker has successfully completed his or her conquest the event is happening after that.

4 0
4 years ago
Dereck works for long hours on his computer. He frequently experiences physical strain by the end of the day because he does not
rjkz [21]
<span>keeping hands and wrists straight while typing</span>
3 0
3 years ago
Read 2 more answers
Sophia's plays her favorite game on her phone, where the game uses the phone's
nirvana33 [79]

Answer:

Augmented Reality

Explanation:

Augmented reality is a camera to overlay images on real-world scenery. Basically what the Pokemon GO app does.

8 0
1 year ago
All of the Internet in your country disappears. What happens next?
Talja [164]

Answer:

It is most likely that in a tech surrounded environment there would be an apacolypse, not necessarily a man hunting man apacolypse but it would cause a huge panic throughout that country because government could not communicate which is what leaves people with a safeplace.

Explanation:

please mark as brainliest xx hope it helps <3

if you really like this topic watch into the forest on netflix, it has the same premise except its not that internet disappears its electricity.

4 0
3 years ago
USB flash drives are small portable units that are used to ____________files.
Juliette [100K]

Answer:D

Explanation: they do all of these

3 0
4 years ago
Read 2 more answers
Other questions:
  • Which osi reference model layer is responsible for transmitting information on computers connected to the same local area networ
    6·1 answer
  • As the design phase of an SDLC begins, programming languages, development tools, and application software needed for the new inf
    13·1 answer
  • Write, compile and test (show your test runs!) program that calculates and returns the fourth root of the number 81, which is 3.
    11·1 answer
  • Ada lovelace designed the first computer
    7·1 answer
  • TRUE OR FALSE: If I ask you to span multiple rows in your table, that means that two columns will merge together
    5·1 answer
  • Strobe lights can become more yellow as they age true or false
    8·1 answer
  • Describe how operating system use the following security tools: firewall, automatic updating, antivirus software, spyware and ma
    11·1 answer
  • In java please
    13·1 answer
  • How many tens are there in the number 156?<br> A. 1<br> B. 15<br> C. 6<br> D. 56
    7·2 answers
  • Does angular need to be installed on server.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!