Skip to content

ChartColumnTypeInferrer

ClassChartGuruChartGuru
public static class ChartColumnTypeInferrer

Heuristic column-type inference. Samples up to maxSamplesPerColumn non-empty cells per column and votes between ChartColumnType.Numeric, ChartColumnType.Date, ChartColumnType.Boolean, and ChartColumnType.Category. A column is classified ChartColumnType.Numeric only when all sampled values parse as numeric (and similarly for the other typed classes). Mixed columns become ChartColumnType.Category. Placeholders for missing values, such as N/A, #N/A, null or a hyphen, count as empty cells. Numbers in the Unix epoch ranges are dates only in a column whose name reads as a time, such as Date, Time, Timestamp or created_at.

public static ChartColumnType[] Infer(IList<string> columns, IList<string[]> rows, int maxSamplesPerColumn = 64)

Infers numeric, temporal, boolean, or categorical column types from a bounded sample of tabular rows.

Parameters

NameType
columnsSystem.Collections.Generic.IList{System.String}
rowsSystem.Collections.Generic.IList{System.String[]}
maxSamplesPerColumnSystem.Int32

Returns

ChartGuru.ChartColumnType[]