Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

in python do the following from a file this is the file i. (5 points) print the file name in the first line and its

in python do the following from a file

image text in transcribed

this is the file

image text in transcribed

i. (5 points) print the file name in the first line and its content in the next lines. ii. (15 points) for each column, print "Column {n} " where {n} denotes the column number starting from 1; and in the next line, print "- \#values: {a} " where {a} is the number of valid values (i.e., not blank). If the number of valid values is positive, continue to print the following stats from the values in the subsequent lines: 1. "- sum: {b} " where {b} is the sum of the values. 2. "- min : {c} " where {c} is the minimum value. 3. "- max:{d} " where {d} is the maximum value. 4. "- avg: {e} " where {e} is the average value. 5. "- SD: {f} " where {f} is the standard deviation of the values. iii. (10 points) continue from the previous bullet. If the column contains some valid values, also print "- Frequency" after "- SD: {f} ". Then, in the subsequent lines, print " { value } : { freq } " for each value in the list of valid values in the column, in an ascending order, where { value\} is the value and { freq } is the number of times it appears in the column. 2,55,57,6,35,47,9,83,2,96

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions