Answered You can hire a professional tutor to get the answer.

QUESTION

I am having trouble with the following code: def data(file_1, columns): quot;quot;quot;This function accepts the name of a .

I am having trouble with the following code:

def data(file_1, columns):

  """This function accepts the name of a .csv data file and a

    list of strings representing column headings in that file

    and return a dict object with each key being a column heading

    and the corresponding value being a numpy array of the values

    in that column of the data file.

  Args:

    filename: the name of a comma separated file containing the data

    filename: str

    columns: a list of column names in the file

    columns:  [str]

  Return:     

    This function will return a dictionary with column names as keys and column values as values

  """

  dictionary = {}

  with open(filename) as f_in:

    values = np.array(columns)

    dictionary.append(columns, values)

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question