Question: Problem 1 Create a function called readData that has one input parameter. The input parameter is the name of the file to be read in.
Problem 1
Create a function called readData that has one input parameter. The input parameter is the name of the file to be read in. Any file read in should be formatted as explained above. The function will read in all the data and store it into a List. The function will return this list. The format of the list will be very similar to the list from Assignment 9.
Example:
If "Baseball Dataset.csv" contained the following lines of text:
1980,Adams,Glenn,AL,262,32,75,.286
1980,Aikens,Willie,AL,543,70,151,.278
1980,Ainge,Danny,AL,111,11,27,.243
The list would look like:
[[1980,"Adams","Glenn","AL",262,32,75,0.286], [1980,"Aikens","Willie","AL",543,70,151,0.278], [1980,"Ainge",Danny","AL",111,11,27,0.243]]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
