Closed narayanvaze closed 1 year ago
Neither. Your header data should be in columns X
and Y
, not x
and y
(notice the case-difference). Per the CsvHelper docs, the case must match by default. Alternatively, you can pass in a configuration that will allow matching headers to lower-case of property names, or you can use a ClassMap.
Hope this helps!
Thank you for taking some time out for my query. Actually, I checked that my headers are indeed X and Y and not x and y. I'll go through CsvHelper docs and ClassMap and let you know here if I find anything helpfull.
Glad I was able to help. Closing for lack of activity. Please feel free to reopen if you have any further questions. Thanks!
using Dbscan;
using System.Globalization;
using CsvHelper;
using (var reader = new StreamReader(@"D:\dev-nrv\random-2d-points.csv")) using (var csv = new CsvReader(reader, CultureInfo.InvariantCulture))
{
var records = csv.GetRecords<IPointData>();
var clusters = Dbscan.Dbscan.CalculateClusters(records.ToList(), epsilon: 2.0, minimumPointsPerCluster: 3);
}
My csv data has two columns 'x' and 'y' with datatype double and seperation character is a comma - ','. Is this an issue with Dbscan package or the CsvHelper?