Initializing help system before first use

xpressinsight.types.PolarsDataFrame

Purpose
Creates an annotation for a PolarsDataFrame entity in an app, which is a group of columns with a shared index, represented as a Polars DataFrame
Synopsis
xpressinsight.types.PolarsDataFrame(index: Union[str, List[str]], columns: Union[Column, List[Column]]) -> Type[polars.DataFrame]
Arguments
index 
The name of the index to use, or list of names for multiple indices. Each entry must be the name of an Index or PolarsIndex type entity within the app. The same index may appear in the list multiple times.
columns 
The columns which make up this data frame.
Example
Example declaring a data frame MixedTable which has three columns.
>>> MixedTable: xi.types.PolarsDataFrame(index='Years', columns=[
...     xi.types.Column("IntCol", dtype=xi.integer, default=-1,
...                     alias="Input Integer Column"),
...     xi.types.Column("StrCol", dtype=xi.string,
...                     alias="Input String Column",
...                     update_after_execution=True),
...     xi.types.Column("ResultCol", dtype=xi.real,
...                     alias="Result Real Column",
...                     manage=xi.Manage.RESULT)
... ])			
Further information
1. The function PolarsDataFrame is part of the package xpressinsight.types.
2. This function returns an Annotated type containing the DataFrame entity object; for example, if xpressinsight has been imported as xi, then xi.types.PolarsDataFrame(index='idx', columns=[xi.types.Column("c1", dtype=xi.integer)]) is equivalent to Annotated[polars.DataFrame, xi.PolarsDataFrame(index='idx', columns=[xi.Column("c1", dtype=xi.integer)])].
3. As Polars frames are not indexed, indexes declared in the Insight schema are represented as additional columns of values in the Polars DataFrame. The uniqueness of the index values will be verified when the data is saved at the end of the scenario.
4. Polars-type entities will only be available if polars has been installed in your Python environment.
Related topics

© 2001-2025 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.