Homework 9
Complete the both parts in a single jupyter notebook. Save your notebook as
firstname_lastname_hw9.ipynb and upload to blackboard.
Part 1 – Lotto.txt
1. Read the file using loadtxt()
2. Sort each row, from smallest number to largest
3. Save the sorted array to a file called lotto_sorted.txt
4. Print to the screen all unique numbers in the array and the count of each unique number
Part 2 – ccbill_hw.csv
1. Load the file into a dataframe using read_csv()
2. Try to plot the following graph:
Hints:
It’s one line of code but it is long and will have multiple parts.
You will need to use .groupby() method to get this to work. We didn’t cover it but play around and see if you can figure it out.