Read a CSV file of price data into a dict mapping names to prices.
(filename, **opts)
| 20 | return Portfolio(portfolio) |
| 21 | |
| 22 | def read_prices(filename, **opts): |
| 23 | ''' |
| 24 | Read a CSV file of price data into a dict mapping names to prices. |
| 25 | ''' |
| 26 | with open(filename) as lines: |
| 27 | return dict(fileparse.parse_csv(lines,types=[str,float], has_headers=False, **opts)) |
| 28 | |
| 29 | def make_report_data(portfolio, prices): |
| 30 | ''' |