Find ten companies whose share prices earn the largest gain from 2006 to 2007. Sort the order of the companies based on the gain amount from the largest to the lowest.The program should produce text output similar to the format below:
--------------------------------------------------------------------
| No | Companies | 2006 Price | 2007 Price | Gain |
--------------------------------------------------------------------
| 1 | INCITEC PIVOT | 22.50 | 79.70 | 57.20 |
. . .
| 10 | COCA-COLA HELLENIC CDI | 35.68 | 50.50 | 14.82 |
--------------------------------------------------------------------
i'm the beginning learner of csv,after i use dicreader to read the file, how to get the difference between 2007 and 2006? because 2007 and 2006 are in the same row........i'm really confused how to use dictionary to match the company name and the gain of the share price???? I have attached csv file~~~
--------------------------------------------------------------------
| No | Companies | 2006 Price | 2007 Price | Gain |
--------------------------------------------------------------------
| 1 | INCITEC PIVOT | 22.50 | 79.70 | 57.20 |
. . .
| 10 | COCA-COLA HELLENIC CDI | 35.68 | 50.50 | 14.82 |
--------------------------------------------------------------------
i'm the beginning learner of csv,after i use dicreader to read the file, how to get the difference between 2007 and 2006? because 2007 and 2006 are in the same row........i'm really confused how to use dictionary to match the company name and the gain of the share price???? I have attached csv file~~~