Question: I am using Python and I am using the Jyupter Notebook. I know that I can group the geos and find the max for time,
I am using Python and I am using the Jyupter Notebook. I know that I can group the geos and find the max for time, but I don't know how I can sort it by the most recent poverty rate.
In 11: population - Table.read table( population.csv) countries Table.read table( countries.csv').where( country', are.contained_in(population.group('geo').column (0))) poverty-Table.read table( 'poverty.csv) poverty show(3) geo time extreme poverty_percent _people below 125 a day alb 1996 alb 2002 alb 2004 0.2 0.73 0.53 ...(1096 rows omitted) Question 1. Assign latest_poverty to a three-column table with one row for each country that appears in the poverty table. The first column should contain the 3-letter code for the country. The second column should contain the most recent poverty total year for which an extreme poverty rate is available for the country. The third column should contain the poverty rate in that year. Do not change the last line, so that the labels of your table are set correctly. Hint: think about how group works: it does a sequential search of the table (from top to bottom) and collects values in the array in the order in which they appear, and then applies a function to that array. The first function may be helpful, but you are not required to use it. In (3661 In 11: population - Table.read table( population.csv) countries Table.read table( countries.csv').where( country', are.contained_in(population.group('geo').column (0))) poverty-Table.read table( 'poverty.csv) poverty show(3) geo time extreme poverty_percent _people below 125 a day alb 1996 alb 2002 alb 2004 0.2 0.73 0.53 ...(1096 rows omitted) Question 1. Assign latest_poverty to a three-column table with one row for each country that appears in the poverty table. The first column should contain the 3-letter code for the country. The second column should contain the most recent poverty total year for which an extreme poverty rate is available for the country. The third column should contain the poverty rate in that year. Do not change the last line, so that the labels of your table are set correctly. Hint: think about how group works: it does a sequential search of the table (from top to bottom) and collects values in the array in the order in which they appear, and then applies a function to that array. The first function may be helpful, but you are not required to use it. In (3661
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
