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
Rather than entering an IP address into our browser, we use a text-based address known as a(n
zalisa [80]

Answer:

url

Explanation:

7 0
2 years ago
Explain the purpose of Data Layer, in the Layered modelfor web applications?
matrenka [14]

Answer:

Purposes of Data Layer, in the Layered model for web applications are as following:-

1. The data Layer,is the third layer and it takes care of the all the operations concerning the database level.

2. This data layer gets a command from the application layer to send a query to the database and will process this command according to the type of database that is used.

3. It will ensure that the correct connections to the database are set.

4. It is represented by the Database.

7 0
3 years ago
Which of the following statements is TRUE of business intelligence (BI) systems? Business intelligence systems are primarily use
Scrat [10]

Answer:

D) Business intelligence systems analyze an organization's past performance to make predictions is the correct answer.

Explanation:

  • Business intelligence systems represent systems that help the business in the decision making and strategic making method.
  • BI provides is applications that help in the analysis, collection, and integration of business information.
  • Business intelligence systems help the organization to analyze the business trends and to find the problems that occur in the business that is required to be examined.

5 0
3 years ago
To work with a different document than the one currently displayed, you would select the _____ option.
kow [346]
You would select the open button. You would have to “open” the new document.

I hope this helped!
5 0
3 years ago
In the CPT manual, the digits of the Category III codes are not intended to reflect the placement of the code in the Category I
dexar [7]

Answer:

Nomenclature

Explanation:

In the CPT manual, the digits of the Category III codes are not intended to reflect the placement of the code in the Category I section of the CPT Nomenclature .

3 0
3 years ago
Other questions:
  • You wish to enter your exam scores in a spreadsheet. Which function will help you find how each subject’s score relates to the o
    8·1 answer
  • Write a function named shareALetter that takes one parameter, wordList – a list of words. Create and return a dictionary in whic
    13·1 answer
  • Why operating system is pivotal in teaching and learning
    10·1 answer
  • You have to sort 1 GB of data with only 100 MB of available main memory. Which sorting technique will be most appropriate?
    5·1 answer
  • According to the Center for 21st Century Skills, critical thinking ability includes all of the following skills, EXCEPT ______.
    5·1 answer
  • Hi I need help with an assignment. We're learning about encryption and decryption in code.org. i need help with three of the tex
    14·1 answer
  • What is the output of the following code?
    5·1 answer
  • Why is making a model, or prototype, important in the design process?
    6·1 answer
  • Software is:
    5·1 answer
  • A search expression entered in one search engine will yield the same results when entered in a different search engine.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!