Read a CSV file of price data into a dict mapping names to prices.
(filename)
| 10 | return fileparse.parse_csv(filename, select=['name','shares','price'], types=[str,int,float]) |
| 11 | |
| 12 | def read_prices(filename): |
| 13 | ''' |
| 14 | Read a CSV file of price data into a dict mapping names to prices. |
| 15 | ''' |
| 16 | return dict(fileparse.parse_csv(filename,types=[str,float], has_headers=False)) |
| 17 | |
| 18 | def make_report_data(portfolio,prices): |
| 19 | ''' |