Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public List<CustomerPurchase> LoadData(string filename)
- {
- Dictionary<int, Dictionary<int, CustomerPurchase>> trainingData = new Dictionary<int, Dictionary<int, CustomerPurchase>>();
- using (var sr = new StreamReader(filename))
- {
- var reader = new CsvReader(sr);
- //CSVReader will now read the whole file into an enumerable
- IEnumerable<CustomerPurchase> records = reader.GetRecords<CustomerPurchase>();
- return records.ToList();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement