Initializing help system before first use

xpressinsight.data.DataFrame

Purpose
Creates an annotation for a DataFrame entity to be fetched from another scenario and stored in a Pandas DataFrame.
Synopsis
xpressinsight.data.DataFrame(columns: List[Column], *, index_names: List[str] = None, index_types: List[Type[BasicType]] = None) -> Type[pandas.DataFrame]
Arguments
columns 
The columns which make up this data frame.
index_names 
The names of the columns to use for the 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 column.
index_types 
The expected data-types for each of the index(es) of the data being read. If given, you must specify a type for each index of this series and AppInterface.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.DataFrame(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
This function returns an Annotated type containing the DataFrame entity object; for example, if xpressinsight has been imported as xi, then xi.data.DataFrame(index_names=['idx'], columns=[xi.data.Column("c1", dtype=xi.integer)]) is equivalent to Annotated[pandas.DataFrame, xi.DataFrame(index=['idx'], columns=[xi.Column("c1", dtype=xi.integer)])].
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.