new DataFrame(data, whatopt, colNamesopt, dtypesopt, nullable)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
data |
DataFrame | GeneratorFunction | !Object.<(string|number), (number|string|Array.<string>|Array.<number>|ColStr|ColNum|TypedArray)> | Array.<Array.<(number|string)>> | Array.<(TypedArray|Array.<number>|Array.<string>|ColStr|ColNum)> | !Map.<String, (number|string|Array.<number>|Array.<string>)> | |||
what |
string |
<optional> |
||
colNames |
Array.<string> | ColStr |
<optional> |
null | labels for every column (#cols === #labels) |
dtypes |
ArrayLike.<(?DType|'s')> |
<optional> <nullable> |
null |
- Source:
Members
(static) dataSets
- Source:
(static) opts
- Source:
dtypes
- Source:
length
- Source:
nCols
- Source:
nominal
- Source:
numColIdxs
- Source:
numeric
- Source:
strColIdxs
- Source:
Methods
(static) of(…cols) → {DataFrame}
Construct a DataFrame from columns.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
cols |
ArrayLike.<*> |
<repeatable> |
- Source:
Returns:
- Type
- DataFrame
(static) setPrinting(opt)
Parameters:
Name | Type | Default | Description |
---|---|---|---|
opt |
string | minimal |
- Source:
agg(fopt, …args) → {DataFrame}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
f |
function |
<optional> |
|
args |
* |
<repeatable> |
- Source:
Returns:
data frame
- Type
- DataFrame
appendCol(col, nameopt, nullable, dtypeopt) → {DataFrame}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
col |
Array.<string> | Array.<number> | TypedArray | |||
name |
String |
<optional> <nullable> |
null | |
dtype |
DType | 's' |
<optional> |
null |
- Source:
Returns:
data frame
- Type
- DataFrame
call(colIdopt, f, …args) → {DataFrame}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
colId |
number | string |
<optional> |
null | |
f |
string | function | |||
args |
* |
<repeatable> |
- Source:
Returns:
data frame with f applied to colId
- Type
- DataFrame
clone() → {DataFrame}
- Source:
Returns:
clone (deep copy) of the data frame
- Type
- DataFrame
col(colId) → {Array.<string>|TypedArray}
Parameters:
Name | Type | Description |
---|---|---|
colId |
string | number |
- Source:
Returns:
column
- Type
- Array.<string> | TypedArray
colIdx(colId) → {number}
Parameters:
Name | Type | Description |
---|---|---|
colId |
string | number |
- Source:
Returns:
column index
- Type
- number
concat(other, axisopt) → {DataFrame}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
other |
DataFrame | |||
axis |
'col' | 'row' | 'cols' | 'rows' | 0 | 1 |
<optional> |
0 |
- Source:
Returns:
data frame
- Type
- DataFrame
connect(f, otheropt, nullable) → {DataFrame}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
f |
string | function | |||
other |
DataFrame |
<optional> <nullable> |
null |
- Source:
Returns:
data frame
- Type
- DataFrame
copy() → {DataFrame}
- Source:
Returns:
shallow copy of the data frame
- Type
- DataFrame
corr(withNamesopt, nullable) → {DataFrame}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
withNames |
boolean |
<optional> <nullable> |
true |
- Source:
Returns:
data frame
- Type
- DataFrame
counts(colId) → {DataFrame}
Produce a count table for values of a column.
Parameters:
Name | Type | Description |
---|---|---|
colId |
string | number |
- Source:
Returns:
data frame of counts
- Type
- DataFrame
cov(withNamesopt, nullable) → {DataFrame}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
withNames |
boolean |
<optional> <nullable> |
true |
- Source:
Returns:
data frame
- Type
- DataFrame
distance(popt, withNamesopt, nullable) → {DataFrame}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
p |
number |
<optional> |
2 | |
withNames |
boolean |
<optional> <nullable> |
true |
- Source:
Returns:
data frame
- Type
- DataFrame
dot(withNamesopt, nullable) → {DataFrame}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
withNames |
boolean |
<optional> <nullable> |
true |
- Source:
Returns:
data frame
- Type
- DataFrame
drop(…params) → {DataFrame}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
params |
number | string | RegExp | function |
<repeatable> |
- Source:
Returns:
data frame
- Type
- DataFrame
dtype(…colIds) → {DataFrame}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
colIds |
string | number |
<repeatable> |
- Source:
Returns:
data frame
- Type
- DataFrame
filter(f, colIdopt) → {DataFrame}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
f |
function | |||
colId |
string | number |
<optional> |
null |
- Source:
Returns:
data frame
- Type
- DataFrame
groupBy(colId, fopt, …args) → {DataFrame}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
colId |
number | string | ||
f |
function |
<optional> |
|
args |
* |
<repeatable> |
- Source:
Returns:
data frame
- Type
- DataFrame
head(nopt, nullable) → {DataFrame}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
n |
number |
<optional> <nullable> |
null |
- Source:
Returns:
data frame
- Type
- DataFrame
matrix(f, withNamesopt, nullable, isCommutativeopt, nullable, identityopt) → {DataFrame}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
f |
function | |||
withNames |
boolean |
<optional> <nullable> |
true | |
isCommutative |
boolean |
<optional> <nullable> |
false | |
identity |
* |
<optional> |
null |
- Source:
Returns:
data frame
- Type
- DataFrame
nBest(nopt, nullable, aggopt, …args) → {DataFrame}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
n |
number |
<optional> <nullable> |
null | number of cols to select |
agg |
string | function |
<optional> |
var | |
args |
* |
<repeatable> |
- Source:
Returns:
data frame
- Type
- DataFrame
oneHot(colId) → {DataFrame}
One hot encode a column.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
colId |
string | number | null |
- Source:
Returns:
one hot encoded table
- Type
- DataFrame
prependCol(col, nameopt, nullable, dtypeopt) → {DataFrame}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
col |
Array.<string> | Array.<number> | TypedArray | |||
name |
String |
<optional> <nullable> |
null | |
dtype |
DType | 's' |
<optional> |
null |
- Source:
Returns:
data frame
- Type
- DataFrame
print(nopt, nullable, mopt, nullable, sink)
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
n |
number |
<optional> <nullable> |
null | |
m |
number |
<optional> <nullable> |
null | |
sink |
function |
- Source:
ps(colId) → {DataFrame}
Produce a ps table for values of a column.
Parameters:
Name | Type | Description |
---|---|---|
colId |
string | number |
- Source:
Returns:
data frame of pss
- Type
- DataFrame
removeAll(val, …colIds) → {DataFrame}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
val |
* | ||
colIds |
* |
<repeatable> |
- Source:
Returns:
data frame without val in colIds
- Type
- DataFrame
removeOutliers(…colIds) → {DataFrame}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
colIds |
number | string |
<repeatable> |
- Source:
Returns:
data frame
- Type
- DataFrame
rename(…params) → {DataFrame}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
params |
string | number |
<repeatable> |
pairs of colId, newName |
- Source:
Returns:
data frame with renamed col
- Type
- DataFrame
replace(colIdopt, pat, repl, …args) → {DataFrame}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
colId |
number | String |
<optional> |
null | |
pat |
RegExp | string | number | |||
repl |
string | number | |||
args |
* |
<repeatable> |
- Source:
Returns:
data frame with f applied to colId
- Type
- DataFrame
sample(nnullable, wrnullable) → {DataFrame}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
n |
number |
<nullable> |
null | ratio or number of elements |
wr |
boolean |
<nullable> |
true | with replacement |
- Source:
Returns:
data frame
- Type
- DataFrame
select(…params) → {DataFrame}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
params |
number | string | RegExp | function |
<repeatable> |
- Source:
Returns:
data frame
- Type
- DataFrame
selectRows(…params) → {DataFrame}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
params |
number | string | RegExp | function |
<repeatable> |
- Source:
Returns:
data frame
- Type
- DataFrame
shuffle() → {DataFrame}
Shuffle the data frame.
- Source:
Returns:
data frame with shuffle rows
- Type
- DataFrame
slice(…idxs) → {DataFrame}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
idxs |
number |
<repeatable> |
PAIRS of indexes |
- Source:
Returns:
a data frame
- Type
- DataFrame
sliceCols(…slices) → {DataFrame}
E.g. sliceCols(0) -> sliceCols(0, end).
E.g. sliceCols(0, 10, 20) -> sliceCols(0, 10, 20, end).
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
slices |
number | string |
<repeatable> |
- Source:
Returns:
data frame
- Type
- DataFrame
sort(colIdopt, ordopt) → {DataFrame}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
colId |
number | string |
<optional> |
null | |
ord |
'asc' | 'des' | function |
<optional> |
asc |
- Source:
Returns:
- Type
- DataFrame
summary() → {DataFrame}
Summaries each column.
- Source:
Returns:
data frame
- Type
- DataFrame
tail(nopt, nullable) → {DataFrame}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
n |
number |
<optional> <nullable> |
null |
- Source:
Returns:
data frame
- Type
- DataFrame
toCSV(fileNameopt, nullable) → {string|undefined}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
fileName |
string |
<optional> <nullable> |
null |
- Source:
Returns:
- Type
- string | undefined
toHTML(fileNameopt, nullable) → {string|undefined}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
fileName |
string |
<optional> <nullable> |
null |
- Source:
Returns:
HTML
- Type
- string | undefined
toJSON(fileNamenullable) → {string|undefined}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
fileName |
string |
<nullable> |
null |
- Source:
Returns:
- Type
- string | undefined
toObj(fileNameopt, nullable) → {Object.<(Array.<number>|Array.<string>)>|undefined}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
fileName |
string |
<optional> <nullable> |
null |
- Source:
Returns:
dictionary
- Type
- Object.<(Array.<number>|Array.<string>)> | undefined
toSQLInserts(tableNameopt, fileNameopt, nullable) → {string}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
tableName |
string |
<optional> |
Table | |
fileName |
string |
<optional> <nullable> |
null |
- Source:
Returns:
- Type
- string
toSQLTableDef(tableName, fileNameopt, nullable) → {string}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
tableName |
string | Table | ||
fileName |
string |
<optional> <nullable> |
null |
- Source:
Returns:
- Type
- string
toSQLUpdates(tableNameopt, fileNameopt, nullable) → {string|undefined}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
tableName |
string |
<optional> |
Table | |
fileName |
string |
<optional> <nullable> |
null |
- Source:
Returns:
- Type
- string | undefined
toString(nopt, mopt) → {string}
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
n |
number |
<optional> |
null | |
m |
number |
<optional> |
null |
- Source:
Returns:
string representation of the data frame
- Type
- string
where(val, colId, op) → {DataFrame}
Parameters:
Name | Type | Default | Description |
---|---|---|---|
val |
string | number | ||
colId |
string | number | null | |
op |
"not is" | "is" | "lt" | "gt" | "gte" | "lte" | ">" | ">=" | "<" | "<=" | "=" | "!=" | "!==" | "==" | "less than" | "greater than" | "not equal" | "ne" | "equal" | "equals" | "less than or equal" | "greater than or equal" | = |
- Source:
Returns:
data frame
- Type
- DataFrame