Question: 1. Write a function ufilter(dataset_path, ustrchar) that accepts the filepath of a dataset that contains a single username per line and an English character (i.e.,

 1. Write a function ufilter(dataset_path, ustrchar) that accepts the filepath of

1. Write a function ufilter(dataset_path, ustrchar) that accepts the filepath of a dataset that contains a single username per line and an English character (i.e., ' a '). The job of this function is to first extract the entire contents of the dataset and next, go through the usernames and only retain the ones that start with the given character. When the job is done the function should return the usernames that meet the criterion. Example ['Aogpinva', 'alxywbyt', 'afalposs', 'ajquifi', 'slzhugyk'] 2. Evaluate the performance, in terms of the execution time of the function you have designed when you are given datasets of different size. What do you observe? Note: you may use the following datasets to aid your evaluation (note: only download the final dataset if you can "handle" the others as this one is 900MB ): https://storage.googleapis.com/bigdata-public/user-datasets/user dataset exp 1.csv https://storage.googleapis.com/bigdata-public/user-datasets/user dataset exp 2 .csv https://storage.goopleapis.com/bigdata-public/user-datasets/user dataset exp 3. csv https://storage.googleapis.com/bigdata-public/user-datasets/user dataset exp 4.csv hittps://storage.googleapis.com/bigdata-public/user-datasets/user dataset exp 5.csv https://storage.googleapis.com/bigdata-public/user-datasets/user dataset exp 6.csv https://storage.googleapis.com/bigdata-public/user-datasets/user dataset exp 7.csv httpsi//storage googleapis.com/bigdata-public/user-datasets/user dataset exp 8.csv 3. Would you characterize ufilter as compute- or data-intensive? Justify your answer. 4. Could ufilter be re-designed so that it can handle large datasets? If yes, could you implement the changes to ufilter by creating a new function giving it the name xufilter

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!