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]
3 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]3 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
Rohan is creating a presentation with at least 50 slides. He wants the slides to use a consistent layout and formatting. Which o
erma4kov [3.2K]

The parts of the presentation that he should design first is Slide master

Slide master is a slide that enables you  to do the following:

•Modify your presentation to suit your taste

•It enables you to make  a partial or minor change  on the slide layout of your presentation

•Slide master  help you to  create a perfect and special  presentation.

•With Slide master  you can easily modify your slide text color.

Inconclusion The parts of the presentation that he should design first is Slide master.

Learn more about Slide master here:

brainly.com/question/12600334

4 0
2 years ago
Consider the following language:
VMariaS [17]

L is a decidable language because the Turing machine accepts it.

L is a recognizable language if  TM M recognizes it.

<h3>How do you know if a language is decidable?</h3>

A language is said to be decidable only when there seems to exists a Turing machine that is said to accepts it,

Here, it tends to halts on all inputs, and then it answers "Yes" on words that is seen in the language and says "No" on words that are not found in the language. The same scenario applies to recognizable language.

So,  L is a decidable language because the Turing machine accepts it.

L is a recognizable language if  TM M recognizes it.

Learn more about programming language from

brainly.com/question/16936315

#SPJ1

8 0
1 year ago
Which type of computer serves as the heart of the computing systems for many, perhaps most, major corporations and government ag
Nezavi [6.7K]

Answer:

Mainframes

Explanation:

Mainframes are utilized by many major corporations and government agencies. They are also used in banking, accounting, and healthcare to name a few.

4 0
2 years ago
3. This shows you the different things that all the tools can do, as you click on the tools
leva [86]
D that’s the answer I learn that in my old school
7 0
3 years ago
If one wanted to use the best method to get storage into long-term memory, one would use _________. maintenance rehearsal rote r
anzhelika [568]

Answer:

elaborative rehearsal

Explanation:

when it comes to storage of information or data into long term memory then elaborative rehearsal plays an important role.

Elaborative rehearsal is a technique which focuses on thinking about the piece of information or data's meaning which is to be stored in long term memory and linking it with the information or data which is already present or stored.

7 0
2 years ago
Other questions:
  • "which part of an information system consists of the rules or guidelines for people to follow?"
    9·1 answer
  • Write statementsto show how finding the length of a character array char [ ] differs from finding the length of a String object
    9·1 answer
  • Data arranged and stored in a data set
    9·1 answer
  • If you specify a user without specifying a hostname, mysql will
    13·1 answer
  • The parallax perspective says that objects that are close up appear to move __________ than far away objects.
    10·1 answer
  • Similarly, the Windows server OS can run regular workstation applications such as MS Office or Adobe Photoshop. Why is this a ba
    5·1 answer
  • In this lab, you will create a programmer-defined class and then use it in a Java program. The program should create two Rectang
    14·1 answer
  • 4.3 Code Practice: Question 1
    12·2 answers
  • Which terms represent the two types of client requirements?
    7·2 answers
  • Define a python functions that draw a pinwheel using the pinwheel function that has input paramiters that allows you to change t
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!