Lab 11: pandas

Logistics

  • Due: Tuesday, July 2 no later than 5pm.
  • Submission instructions: upload solution, entitled FirstName-LastNameLab11.py to the BrightSpace Lab 11 Dropbox.
  • Deadline reminder: once this deadline passes, BrightSpace will no longer accept your Python submission and you will no longer be able to earn credit. Thus, if you are not able to fully complete the assignment, submit whatever you have before the deadline so that partial credit can be earned.

Learning outcomes

  • Gain experience with pandas to manipulate data.
  • Continue to gain experience with matplotlib.

Assignment

  • Download billionaires.csv from the website here.
  • Download lab11.py and rename it according to the instructions above.
  • Implement the missing functions to match this transcript and this output file.
  • Hint: use plt.savefig(output_filename) to save the histogram to a file, rather than displaying it when the program is run.

Grading - 10 points

2 - The get_data_shape function is correct.

2 - The compute_total_wealth function is correct.

2 - The compute_num_women function is correct.

2 - The plot_histogram function is correct.

2 - in a comment at the top of your Python file, write a few sentences interpreting age_histogram.png.

Grading turnaround

All labs graded with scores recorded in BrightSpace no later than lab time (2pm) the following day.