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