Page 1 of 1

Create a function average_from_csv(filename) to calculate the average of the numbers (at the second column) in a .csv fi

Posted: Tue Jul 12, 2022 8:04 am
by answerhappygod
Create A Function Average From Csv Filename To Calculate The Average Of The Numbers At The Second Column In A Csv Fi 1
Create A Function Average From Csv Filename To Calculate The Average Of The Numbers At The Second Column In A Csv Fi 1 (250.57 KiB) Viewed 98 times
Create a function average_from_csv(filename) to calculate the average of the numbers (at the second column) in a .csv file with the given filename. The format of the .csv file is as follows: The columns in each row (line) are separated by commas, like: Taro, 30 Jiro, 40 Hanako, 50 * Hint: use str.split() method * Note: return the average value in the function, no print is needed.