Question: Using python, how to find average value of element k for n list. I have a csv file containing entries in every row and would

Using python, how to find average value of element k for n list. I have a csv file containing entries in every row and would like to calculate the average value of a particular position inside the row for a given number of rows.

For example, below are 6 rows all with 5 elements, and the average value in the first element position for 3 and 6 rows, respectively, is:

3rows: 0+0+0/3=0, 1+1+1/3=1

6rows: 0+0+0+1+1+1/6=0.5

Then, for another example, the average value in the fifth element position for 3 and 6 rows, respectively, is:

3rows: 44+43+19/3=35.33, 43+45+38/3=29.67

6rows:44+43+19+43+45+38/6=38.67

.

0, 0, 23, 49, 44

0, 0, 28, 49, 43

0, 3, 40, 46, 19

1, 2, 14, 45, 43

1, 4, 6, 41, 45

1, 5, 16, 38, 38

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!