Advertisement
Atheuz

Untitled

Feb 23rd, 2015
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1.         public List<CustomerPurchase> LoadData(string filename)
  2.         {
  3.             Dictionary<int, Dictionary<int, CustomerPurchase>> trainingData = new Dictionary<int, Dictionary<int, CustomerPurchase>>();
  4.             using (var sr = new StreamReader(filename))
  5.             {
  6.                 var reader = new CsvReader(sr);
  7.  
  8.                 //CSVReader will now read the whole file into an enumerable
  9.                 IEnumerable<CustomerPurchase> records = reader.GetRecords<CustomerPurchase>();
  10.                 return records.ToList();
  11.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement