WEBVTT 00:00:00.590 --> 00:00:03.030 All right, why don't we walk through the solution. 00:00:03.030 --> 00:00:05.920 Here, we're going to start with our olympic_medal_counts_df DataFrame, 00:00:05.920 --> 00:00:08.150 as we have in the previous exercises. 00:00:08.150 --> 00:00:12.160 First, we're going to create a new, smaller dataframe called metal counts, 00:00:12.160 --> 00:00:16.480 which is the olympic_medal_count_df DataFrame, but only the gold, silver, and 00:00:16.480 --> 00:00:17.125 bronze columns. 00:00:18.400 --> 00:00:22.175 Then we're going to use the numpy.dot function to matrix multiply this 00:00:22.175 --> 00:00:26.810 metal_counts_matrix with the 4, 2, 1 array which represents the number of 00:00:26.810 --> 00:00:30.460 points that each country would score for a gold, silver, or bronze medal. 00:00:30.460 --> 00:00:33.280 So what we're going to get here is an array, 00:00:33.280 --> 00:00:37.190 where the value is 4 times the number of gold medals plus 2 times the number of 00:00:37.190 --> 00:00:41.020 silver medals plus 1 times the number of bronze medals. 00:00:41.020 --> 00:00:44.750 Down here, I'm going to define this Python dictionary called olympic_points, 00:00:44.750 --> 00:00:46.430 where again I provide us the keys, 00:00:46.430 --> 00:00:50.490 the column names, and as the values panda series, where I provide as 00:00:50.490 --> 00:00:55.370 the argument first the list of country names and here, this array points, 00:00:55.370 --> 00:00:58.040 which again has the total number of points that each country earned. 00:00:59.150 --> 00:01:05.830 Finally, I'm just going to say olympic_points_df is DataFrame of olympic_points. 00:01:05.830 --> 00:01:08.600 This is just the tip of the iceberg when it comes to pandas and 00:01:08.600 --> 00:01:10.610 numpy's functionality. 00:01:10.610 --> 00:01:13.830 If you're interested to read more about what these libraries can do, 00:01:13.830 --> 00:01:16.950 I encourage you to check out the full documentation which are found in 00:01:16.950 --> 00:01:18.910 the urls in the instructor comments below