Create a class that can download, store, and perform operations on files like the files used in lab 4.

PYTHON

Use python to do this question.

Create a class that can download, store, and perform operations on files like the files used in lab 4.

This class should have a least the following methods:

load(url, …): Download and store in the class the data loaded from the URL passed as an argument.

save(filename, …) : Save the data on the hard drive.

get_columns_mean() : Return a dictionary with the years as keys and the mean income as values.

get_rows_mean() : Return a dictionary with the counties as keys and the mean income as values.

__str__(): Return a string which when printed should look like the printout in lab 4.

 

Create a class that can download, store, and perform operations on files like the files used in lab 4.
Scroll to top