In: Computer Science
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
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.