Skip to main content

Stats

Represents basic descriptive statistics calculated for a Column. See samples: https://public.datagrok.ai/js/samples/data-frame/stats

Constructors

new Stats()

new Stats(dart): Stats

Parameters

ParameterType
dartany

Returns

Stats

Source

src/dataframe.ts:1861

Properties

PropertyModifierType
dartprivateany

Accessors

avg

get avg(): number

Returns

number

  • average

Source

src/dataframe.ts:1914


kurt

get kurt(): number

Returns

number

  • kurtosis

Source

src/dataframe.ts:1934


max

get max(): number

Returns

number

  • maximum

Source

src/dataframe.ts:1904


med

get med(): number

Returns

number

  • median value

Source

src/dataframe.ts:1939


min

get min(): number

Returns

number

  • minimum

Source

src/dataframe.ts:1899


missingValueCount

get missingValueCount(): number

Number of missing (empty) values.

Returns

number

Source

src/dataframe.ts:1884


q1

get q1(): number

Returns

number

  • first quartile

Source

src/dataframe.ts:1944


q2

get q2(): number

Returns

number

  • second quartile

Source

src/dataframe.ts:1949


q3

get q3(): number

Returns

number

  • third quartile

Source

src/dataframe.ts:1954


skew

get skew(): number

Returns

number

  • skewness

Source

src/dataframe.ts:1929


stdev

get stdev(): number

Returns

number

  • standard deviation

Source

src/dataframe.ts:1919


sum

get sum(): number

Returns

number

  • sum

Source

src/dataframe.ts:1909


totalCount

get totalCount(): number

Total number of values (including missing values).

Returns

number

Source

src/dataframe.ts:1879


uniqueCount

get uniqueCount(): number

Number of unique values.

Returns

number

Source

src/dataframe.ts:1889


valueCount

get valueCount(): number

Number of non-empty values.

Returns

number

Source

src/dataframe.ts:1894


variance

get variance(): number

Returns

number

  • variance

Source

src/dataframe.ts:1924

Methods

corr()

corr(otherColumn): number

Pearson correlation

Parameters

ParameterTypeDescription
otherColumnColumn<any>

Returns

number

Source

src/dataframe.ts:1961


spearmanCorr()

spearmanCorr(otherColumn): number

Spearman correlation

Parameters

ParameterTypeDescription
otherColumnColumn<any>

Returns

number

Source

src/dataframe.ts:1966


toString()

toString(): string

Returns

string

Source

src/dataframe.ts:1974


fromColumn()

static fromColumn(col, mask): Stats

Calculates statistics for the specified column.

Parameters

ParameterTypeDefault valueDescription
colColumn<any>undefined
masknull | BitSetnull

Returns

Stats

Source

src/dataframe.ts:1869


fromValues()

static fromValues(values): Stats

Calculates statistics for the array of values.

Parameters

ParameterType
valuesnumber[] | Int8Array | Int16Array | Int32Array | Float32Array | Float64Array

Returns

Stats

Source

src/dataframe.ts:1874


histogramsByCategories()

static histogramsByCategories(valueColumn, catColumn): Int32Array[]

Returns distributions of [valueColumn] for each category in [catColumn].

Parameters

ParameterType
valueColumnColumn<any>
catColumnColumn<any>

Returns

Int32Array[]

Source

src/dataframe.ts:1969