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
Which character is used to begin a comment?
Aloiza [94]
# is used to begin a comment.
8 0
3 years ago
Chapter 20 reading and vocab review
aev [14]

Answer:

Essentially additive editing and stringing “the good stuff” together, whereas subtractive is more about stringing all your raw footage together and “removing the bad stuff”

Additive editing feels confident and concerned with the pursuit of a specific, existing vision. And it’s faster. Subtractive editing feels like a deeper listening to what the footage is saying, and holding on to many potential permutations.

Explanation:

Addictive editing -  creating a program from raw footage by starting by starting with nothing and adding selected components

Subtraction editing  - creating a program by removing redundant or poor quality material from the original footage

7 0
2 years ago
How is communication within healthcare different than communication within other industries ?
vfiekz [6]

Answer:

It has to be more specific and easier to understand because of its importance.

Explanation:

7 0
3 years ago
Technician A says that high pressure in recycled refrigerant is only caused by air contamination. Technician B says that recycle
hjlf

Answer:

a. A only

Explanation:

When air, is in excess of allowable amounts, it  can cause the system to operate at pressures that are higher than normal. This means that the recycled refrigerant is operating at high pressure. Thus Technician A is correct.

However, Technician B is incorrect because unlike reclaimed refrigerants where the process strip the refrigerant of impurities making it to meet the standards of a new refrigerant, the recycled refrigerant is not as pure as it's contaminants are only reduced.

Therefore, only technician A is correct.

6 0
3 years ago
Roark has just joined a company and in his role as a lead analyst, he will be responsible for determining which systems developm
hram777 [196]

Answer:

Agile/adaptive methods.

Explanation:

The user has just decided to join a firm and will also be accountable to determine whether that system development technique that group uses to establish the latest software for a significant medical distributor to his position as just a lead analyst.

After that, he consumes a week for the purpose to understand his group members for reason to know their strengths and weakness and how would they work under pressure.

So, the following method is required for him to understand about the disadvantages of each of them.

4 0
3 years ago
Other questions:
  • In the following statement:
    12·1 answer
  • Which component is the smallest unit in a spreadsheet?
    14·2 answers
  • The local emergency manager has the responsibility for coordinating emergency management programs and activities. A local emerge
    7·1 answer
  • We will use linear interpolation in a C program to estimate the population of NJ between the years of the census, which takes pl
    10·1 answer
  • Explain how SEO impacts the way you should interpret search engine results ???
    6·1 answer
  • Mississippi law codes state that bullying and cyberbullying are against the law. A court can decide to incur ___________________
    10·1 answer
  • Please help thank u!!!!!
    13·2 answers
  • In addition to assuming that n is a power of 2, we made, for the sake of simplicity, another, more subtle, assumption in setting
    5·1 answer
  • What does command do
    5·1 answer
  • What is the accurate description
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!