April 2017
Intermediate to advanced
532 pages
12h 39m
English
We count a number of the various occupations of our users.
The following steps were implemented to get the occupation DataFrame and populate the list, which was displayed using Matplotlib.
The complete code listing can be found following:
user_data = get_user_data() user_occ = user_data.groupby("occupation").count().collect() user_occ_len = len(user_occ) user_occ_list = [] for i in range(0, (user_occ_len - 1)): element = user_occ[i] count = element. __getattr__('count') ...Read now
Unlock full access