Skip to content

index

BaseIndex

Bases: ImmutableObject, ABC

Base class for SaolaPy indices.

query_columns property abstractmethod

query_columns: List[PQLColumn]

Returns PQL column of index.

query_column_names property

query_column_names: List[str]

Returns list of query column names.

query_column_queries property

query_column_queries: List[str]

Returns list of query column queries.

Index

Index(data, name='Index')

Bases: BaseIndex

One-dimensional PQL Index.

Parameters:

  • data (ColumnLike) –

    Data to be used. Can be either PQL query string, PQLColumn, or PQLOperator.

  • name (str) –

    Name of object. Defaults to 'Index'.

data property

data: PQLOperator

Returns data of index.

name property

name: str

Returns name of index.

query_columns property

query_columns: List[PQLColumn]

Returns PQL columns of index.

MultiIndex

MultiIndex(levels)

Bases: BaseIndex

Multi-dimensional PQL Index.

Parameters:

  • levels (List[Index]) –

    Indices to be used as multi index.

levels property

levels: List[Index]

Returns levels of multi index.

names property

names: List[str]

Names of levels in multi index.

nlevels property

nlevels: int

Returns number of levels of multi index.

query_columns property

query_columns: List[PQLColumn]

Returns PQL columns of multi index.

RangeIndex

RangeIndex(start=0, step=1, name='Index')

Bases: Index

Immutable index implementing a monotonically increasing integer range.

Parameters:

  • start (int) –

    Start of range, defaults to 0.

  • step (int) –

    Step size of range, defaults to 1.

  • name (str) –

    Name of object.