Advertisement
Guest User

Untitled

a guest
Apr 16th, 2014
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. type restaurantCsv = CsvProvider<"C:UsersPaulDesktopHealthDepartmentRestaurantRatings2013.csv",HasHeaders=true>
  2.  
  3. type RawInspectionData(filename : string) =
  4. member this.allData = restaurantCsv.Load(filename)
  5.  
  6. member public this.inspectionsList = this.allData.Data.ToList()
  7.  
  8. member this.FilterByName(name : string) =
  9. this.allData.Data
  10. |> Seq.filter (fun x -> x.EstablishmentName.Contains(name))
  11.  
  12. var inspectionsOnCafes = inspections2013.FilterByName("Cafe");
  13. var inspections = (from row in inspectionsOnCafes
  14. select new
  15. {
  16. inspectorID = row.Item3,
  17. restaurantName = row.Item5,
  18. inspectionDate = row.Rest.Item6
  19. }).ToList();
  20.  
  21. inspectorID = row.InspectorID,
  22. // etc.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement