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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started