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