MCPcopy Create free account
hub / github.com/catboost/catboost / GetDsvColumnCount

Function GetDsvColumnCount

catboost/libs/data/cb_dsv_loader.cpp:409–419  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

407 }
408
409 size_t GetDsvColumnCount(const TPathWithScheme& pathWithScheme, const TDsvFormatOptions& format) {
410 CB_ENSURE_INTERNAL(pathWithScheme.Scheme == "dsv", "Unsupported scheme " << pathWithScheme.Scheme);
411 TString firstLine;
412 CB_ENSURE(
413 GetLineDataReader(pathWithScheme, format)->ReadLine(&firstLine),
414 "TCBDsvDataLoader: no data rows in pool"
415 );
416 return TVector<TString>(
417 NCsvFormat::CsvSplitter(firstLine, format.Delimiter, format.IgnoreCsvQuoting ? '\0' : '"')
418 ).size();
419 }
420
421 static void AugmentWithExternalFeatureNames(
422 TConstArrayRef<TString> featureNames,

Callers 1

CalcMetricsMethod · 0.85

Calls 4

GetLineDataReaderFunction · 0.85
CsvSplitterClass · 0.85
ReadLineMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected