## Homework 3-1

### Pandas

In this homework assignment, you will get to use the same data you worked with in the activity!

The dataset contains happiness data on countries worldwide. If you haven't done so already, download the csv file here and save it in your CS 3 workspace.

The happiness statistic in the data set is a sum of all of the other attributes (Economy, Family, Health, Freedom, Trust, Generosity, Dystopia). In this homework assignment you will use pandas and data frames in your own program that will generate your own happiness statistic, rank countries based on your statistic, and explore changes with the new data set.

Using the attributes from the data set, divise your own happiness statistic. One way to create a new statistic is computing a weighted sum of the different attributes. You can weight factors you think are more important heavier than factors that are less important. This is a more effective way to determine a rating than simply taking the sum of different attributes. In your program, write a 1-2 sentence comment justifying the choices you made for your new statistic.

Now, you should have a data frame with two statistics: the initial happiness rating and your new happiness rating. Use this data to answer the following questions:

1. Based on your new ranking: What are the 10 happiest countries?
2. Based on your new ranking: What are the 10 least happy countries?
3. How do countries rank within their respective regions? (Hint: Use a query to find out!)
4. How have the rankings you calculated in steps 1-3 changed between your new statistic and the old statistic?
Make sure your submission has your name in the filename: `FirstLast_HW3-2.py`. “FirstLast” should be replaced with your first and last name or we will take off points. Make sure every task has been completed.