Skip to content

pandasx / Slice

Class: Slice ​

Defined in: src/core/indexes.ts:303

Slice for loc/iloc. With iloc bounds are positions and stop is exclusive; with loc bounds are labels and stop is inclusive, as in pandas.

Constructors ​

Constructor ​

new Slice(start?, stop?, step?): Slice

Defined in: src/core/indexes.ts:308

Parameters ​

ParameterTypeDefault value
start?Labelundefined
stop?Labelundefined
step?number1

Returns ​

Slice

Properties ​

PropertyModifierTypeDefined in
startreadonlyLabel | undefinedsrc/core/indexes.ts:304
stepreadonlynumbersrc/core/indexes.ts:306
stopreadonlyLabel | undefinedsrc/core/indexes.ts:305

Methods ​

labelPositions() ​

labelPositions(index): number[]

Defined in: src/core/indexes.ts:332

Positions selected from an index by label bounds (inclusive stop).

Parameters ​

ParameterType
indexIndex

Returns ​

number[]


positions() ​

positions(n): number[]

Defined in: src/core/indexes.ts:316

Positions selected from a sequence of length n (positional semantics).

Parameters ​

ParameterType
nnumber

Returns ​

number[]

Released under the MIT License.