Question

In: Computer Science

Implement a generic utility to summarize a table of data. In particular, for specified columns, find...

Implement a generic utility to summarize a table of data. In particular, for specified columns, find the minimum, average, and maximum value for each of those columns and print out a nicely-formatted report. Hint: You might want to process one line at a time maintaining, in a dictionary, the running stats for each column.

For example: stats = '{'test1': {'min': 80.5, 'sum':845.0, 'max':100.0}, 'test2': {...}, ...etc.' If you also maintain a row counter, you’ll be able to calculate the averages after you have accumulated statistics on each column.

Post answer in PYTHON script using ATOM or REPL

DO NOT IMPORT PANDAS or DATA FRAMES to solve

Solutions

Expert Solution

Python code for the above:
I've used Jupyter notebook to show you how the above can be obtained on sample data, however, the steps remain the same for any other data.


Related Solutions

You'll implement a completely generic version of an algorithm to find the maximum of an array....
You'll implement a completely generic version of an algorithm to find the maximum of an array. Unlike in the past, when our algorithm only worked for int[] or double[], this version will work on any Java objects that are comparable, specifically any Java object that implements the Comparable interface. Create a public class named Max with a single class method named max. max should accept an array of Objects that implement Comparable and return the maximum. If the array is...
The data in columns 1 and 2 in the table below are for a private closed...
The data in columns 1 and 2 in the table below are for a private closed economy. GDP A.E. Private Closed Economy Exports Imports Net Exports A.E. Private Open Economy 200 240 20 30 250 280 20 30 300 320 20 30 350 360 20 30 400 400 20 30 450 440 20 30 500 480 20 30 550 520 20 30 a. Use columns 1 and 2 to determine the equilibrium GDP for this hypothetical economy. b. Now open...
#data structure 1.Implement the generic PriorityQueueInterface in a class named PriorityQueue. Note: it must be named...
#data structure 1.Implement the generic PriorityQueueInterface in a class named PriorityQueue. Note: it must be named PriorityQueue The priority queue MUST be implemented using a linked list. 2 test program checks that a newly constructed priority queue is empty o checks that a queue with one item in it is not empty o checks that items are correctly entered that would go at the front of the queue o checks that items are correctly entered that would go at the...
Suppose a firm has the following production possibilities data (left columns in the table below), please...
Suppose a firm has the following production possibilities data (left columns in the table below), please determine its Marginal Cost (MC) data and write them in the right columns. PPF MC Pizza (per hour) Bagel (per hour) Pizza (per hour) Bagel (per hour) 0 30 - - 2 28 4 24 6 18 8 10 10 0
For the data in the​ table, find the mean and the median of the monthly high...
For the data in the​ table, find the mean and the median of the monthly high temperatures. Then do the same for the monthly low temperatures.What is the mean of the monthly high​ temperatures? month high low Jan 16 7 Feb 23 13 Mar 29 18 April 43 30 May 56 45 The mean of the high temperatures °F. ​(Type an integer or a​ decimal.) What is the median of the monthly high​ temperatures? The median of the high temperatures...
The following table shows income distribution data for an economy in a particular year. Household Group...
The following table shows income distribution data for an economy in a particular year. Household Group Share of Aggregate Income One-fifth with lowest income 4.7% Next lowest one-fifth 8.5% Middle one-fifth 19.4% Next highest one-fifth 27.6% One-fifth with highest income 39.8% What is the Gini coefficient?
Consider the data in table below which shows the time required to produce a particular item....
Consider the data in table below which shows the time required to produce a particular item. Using that data, calculate the learning rate associated with this product. Units Labor Hrs 5 155 9 147 13 137 17 97 25 72
The following table shows income distribution data for an economy in a particular year. Household Group                         &n
The following table shows income distribution data for an economy in a particular year. Household Group                                      Share of Aggregate Income    One-fifth with lowest income                                   8.1%                      Next lowest one-fifth 11.5%                    Middle one-fifth                                                20.0%                           Next highest one-fifth                                    22.8%                           One-fifth with highest income                               37.6%                          What is the Gini coefficient for this economy? .440 .328 .281 1.453 .459
Find either a linear or an exponential function that models the data in the table. x...
Find either a linear or an exponential function that models the data in the table. x −3 −2 −1 0 1 y 128 64 32 16 8 ​f(x)= ​(Use integers or fractions for any numbers in the​ expression.) Note: Please show how to solve using TI-84 Plus calculator
Find the standard? deviation, s, of sample data summarized in the frequency distribution table below by...
Find the standard? deviation, s, of sample data summarized in the frequency distribution table below by using the formula?below, where x represents the class? midpoint, f represents the class? frequency, and n represents the total number of sample values.? Also, compare the computed standard deviation to the standard deviation obtained from the original list of data?values, 11.1 sequals=StartRoot StartFraction n left bracket Summation from nothing to nothing left parenthesis f times x squared right parenthesis right bracket minus left bracket...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT