Initializing help system before first use

xpressinsight.data.PolarsDataFrame

Purpose
Creates an annotation for a PolarsDataFrame entity to be fetched from another scenario and stored in a Polars DataFrame.
Synopsis
xpressinsight.data.PolarsDataFrame(columns: List[Column], *, index_names: List[str] = None, index_types: List[Type[BasicType]] = None) -> Type[polars.DataFrame]
Arguments
columns 
The columns which make up this data frame.
index_names 
The names of the columns to use for Insight index(es) of the data being read. If not given, names derived from the index entities in the other scenario will be used. If given, the names must be unique and there must be one for each index.
index_types 
The expected data-types for each of the Insight index(es) of the data being read. If given, you must specify a type for each index of this series and :fct-ref:`insight.get_scenario_data will verify the index values being fetched is of these types.
Example
Example declaring a data frame MixedTable which has three columns.
>>> MixedTable: xi.data.PolarsDataFrame(index='Years', columns=[
...     xi.data.Column("IntCol", dtype=xi.integer, default=-1),
...     xi.data.Column("StrCol", dtype=xi.string),
...     xi.data.Column("ResultCol", dtype=xi.real)
... ])			
Further information
1. This function returns an Annotated type containing the PolarsDataFrame entity object; for example, if xpressinsight has been imported as xi, then xi.data.PolarsDataFrame(index_names=['idx'], columns=[xi.data.Column("c1", dtype=xi.integer)]) is equivalent to Annotated[polars.DataFrame, xi.PolarsDataFrame(index=['idx'], columns=[xi.Column("c1", dtype=xi.integer)])].
2. Polars-type entities will only be available if polars has been installed in your Python environment.
Related topics

© 2001-2024 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.