Skip to content

index

BaseIndex

Bases: ImmutableObject, ABC

Base class for SaolaPy indices.

query_columns abstractmethod property

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.

object_str staticmethod

object_str(class_name, properties)

Returns string representation of object with given class name and properties.

Parameters:

  • class_name (str) –

    Name of object class.

  • properties (OrderedDict[str, Any]) –

    Properties to include.

Returns:

  • str

    String representation.

shorten_string staticmethod

shorten_string(string, max_length=None)

Shortens string to have maximum of max_length characters.

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'.

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.

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.

object_str staticmethod

object_str(class_name, properties)

Returns string representation of object with given class name and properties.

Parameters:

  • class_name (str) –

    Name of object class.

  • properties (OrderedDict[str, Any]) –

    Properties to include.

Returns:

  • str

    String representation.

shorten_string staticmethod

shorten_string(string, max_length=None)

Shortens string to have maximum of max_length characters.

MultiIndex

MultiIndex(levels)

Bases: BaseIndex

Multi-dimensional PQL Index.

Parameters:

  • levels (List[Index]) –

    Indices to be used as multi 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.

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.

object_str staticmethod

object_str(class_name, properties)

Returns string representation of object with given class name and properties.

Parameters:

  • class_name (str) –

    Name of object class.

  • properties (OrderedDict[str, Any]) –

    Properties to include.

Returns:

  • str

    String representation.

shorten_string staticmethod

shorten_string(string, max_length=None)

Shortens string to have maximum of max_length characters.

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.

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.

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.

object_str staticmethod

object_str(class_name, properties)

Returns string representation of object with given class name and properties.

Parameters:

  • class_name (str) –

    Name of object class.

  • properties (OrderedDict[str, Any]) –

    Properties to include.

Returns:

  • str

    String representation.

shorten_string staticmethod

shorten_string(string, max_length=None)

Shortens string to have maximum of max_length characters.