Write a program that performs the following: 1. Reads in an unknown number of lines from...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a program that performs the following: 1. Reads in an unknown number of lines from input, where: a. each line may be assumed to have the same number of space-delimited items; b. the first item is a string designating the "name" of the dataset on the remainder of the line; and c. the input terminates if a blank line is entered. 2. Converts the input data to a pandas DataFrame; 3. Prints the output of the describe () method on that DataFrame. For example, suppose the input is setA 0.5 0.6 0.7 setB 0.5 0.7 0.9 setC 0.2 0.4 0.6 (blank line here) Then the output would be setA setB setC count 3.00 3.0 3.0 mean 0.60 0.7 0.4 std 0.10 0.2 0.2 min 0.50 0.5 0.2 25% 0.55 0.6 0.3 50% 0.60 0.7 0.4 75% 0.65 0.8 0.5 max 0.70 0.9 0.6 Write a program that performs the following: 1. Reads in an unknown number of lines from input, where: a. each line may be assumed to have the same number of space-delimited items; b. the first item is a string designating the "name" of the dataset on the remainder of the line; and c. the input terminates if a blank line is entered. 2. Converts the input data to a pandas DataFrame; 3. Prints the output of the describe () method on that DataFrame. For example, suppose the input is setA 0.5 0.6 0.7 setB 0.5 0.7 0.9 setC 0.2 0.4 0.6 (blank line here) Then the output would be setA setB setC count 3.00 3.0 3.0 mean 0.60 0.7 0.4 std 0.10 0.2 0.2 min 0.50 0.5 0.2 25% 0.55 0.6 0.3 50% 0.60 0.7 0.4 75% 0.65 0.8 0.5 max 0.70 0.9 0.6
Expert Answer:
Answer rating: 100% (QA)
CODE import pandas as pd Create an empty dictionary data dict ... View the full answer
Related Book For
Income Tax Fundamentals 2013
ISBN: 9781285586618
31st Edition
Authors: Gerald E. Whittenburg, Martha Altus Buller, Steven L Gill
Posted Date:
Students also viewed these programming questions
-
The following additional information is available for the Dr. Ivan and Irene Incisor family from Chapters 1-5. Ivan's grandfather died and left a portfolio of municipal bonds. In 2012, they pay Ivan...
-
7 8 0 The following data is provided for the Piedmont Corporation. All costs are actual costs. Complete the cost flows diagram attached to this problem and calculate CGM and CGS. Prepare journal...
-
A soda producer makes and sells two products, Classic Cola and Diet Cola. If this company spends X1 dollars on promotion of Classic Cola in a particular western city, it can sell at 75 X1^ 0.5...
-
Duweynie Company designs landscape plans and plants the material for clients. On April 1, there were three jobs in process, Jobs 39, 40, and 41. During April, two more jobs were started, Jobs 42 and...
-
Determine the direction of the magnetic force exerted at the center of the wire or on the particles in Figure 28. 20. Data from Figure 28. 20 Figure 28.20 (a) (b) N S S N +8 te
-
How does a project manager price out a job in which the specifications are not prepared until the job is half over?
-
1. 2. 3. (c) 11 Let f : R R be a continuous function such that f(3x)-f(x) =. If f(8) = 7, then f(14) is equal to: (a) 4 (b) 10 (d) 16 Let O be the origin and A be the point z = 1 + 2i. If B is the...
-
Snackums, Inc., purchases wheat for use in its food manufacturing process. Snackums operates in a highly competitive industry and is rarely able to increase its sales price. On January 1, 2024,...
-
The following is a list of account titles and amounts (dollars in millions) from a recent annual report by Hasbro, Inc., a leading manufacturer of games, toys, and interactive entertainment software...
-
Sandra currently earns $5,000 per month before taxes. If she dies, she would like her common-law partner Felicia to continue to receive the same income. It is assumed that a rate of return of 5%...
-
Summarize effective group conflict resolution techniques. Analyze how an organization's design influences organizational behavior. Assess how organizational behavior is affected by individual and...
-
A small metal casting company has the opportunity to produce a custom gear part for a high performance application using AM. They currently have an offer from a service provider to print sand molds...
-
The following reaction begins when 0.56 mol of CO and 0.64 mol of H2O are added to a 2.00 L reaction vessel at a constant temperature. CO(g) + H2O (g) = CO2(g) + H2(g) At equilibrium, there were 0.22...
-
Accounts Payable had a beginning balance that was a Debit balance. What might this mean?
-
The financial statements for Highland Corporation included the following selected information: $ 495,000 $ 700,000 $1,020,000 99,000 73,000 $ 750,000 Common stock Retained earnings Net income Shares...
-
(a) What do data breach notification laws require? (b) Why has this caused companies to think more about security?
-
Bill and Guilda each own 50 percent of the stock of Radiata Corporation, an S corporation. Guilda's basis in her stock is $25,000. On July 31, 2012, Bill sells his stock, with a basis of $40,000, to...
-
Ulysses and Penelope are married and file separate returns for 2012. Penelope itemizes her deductions on her return. Ulysses' adjusted gross income was $17,400, his itemized deductions were $2,250,...
-
Marty is a sales consultant. Marty incurs the following expenses related to entertainment of his clients in 2012: Dues to a country club......................................................$4,500...
-
(a) Determine the critical values for a right-tailed test of a standard population deviation with 15 degrees of freedom at \(\alpha=0.1\) level of significance. (b) Determine the critical values for...
-
A simple random sample of size \(n=20\) is drawn from a population that is normally distributed. The sample variance is found to be 49.3. Determine whether the population variance is less than 95 at...
-
To test \(H_{0}: \sigma=0.35\) versus \(H_{1}: \sigma <0.35\), a random sample of size \(n=41\) is obtained from a population that is known to be normally distributed. (a) If the sample standard...
Study smarter with the SolutionInn App