Initializing help system before first use

xpressinsight.scenario.IndexUpdate

Purpose
Representation of an update to the value of an index entity (also known as a set entity).
Synopsis
class xpressinsight.IndexUpdate(scenario.EntityUpdate)
Arguments
entity_name: str 
The name of the entity being updated.
add: Union[Iterable, pd.Series, pd.Index, pl.Series] 
A list of values to add to the set. Can be a Pandas index or series, a Polars series, or any Iterable. If a Pandas series, the index of the series is ignored. If a Pandas index, must not be a multi-index.
remove: Union[Iterable, pd.Series, pd.Index, pl.Series] 
A list of values to remove from the set. Can be a Pandas index or series, a Polars series, or any Iterable. If a Pandas series, the index of the series is ignored. If a Pandas index, must not be a multi-index.
Example
Add the values Saturday and Sunday to the index DAYS, and remove Wednesday and Thursday:
>>> with ins.InsightRestClient(insight_url='http://localhost:8080/') as client:
...     client.update_scenario_data('570b9100-46e3-4643-baee-2e24aa538f25', [
...         IndexUpdate('DAYS', add=['Saturday', 'Sunday'],
...                             remove=['Wednesday', 'Thursday'])])			
Add the values Saturday and Sunday to the index DAYS, and remove Wednesday and Thursday, using Pandas data types:
>>> with ins.InsightRestClient(insight_url='http://localhost:8080/') as client:
...     client.update_scenario_data('570b9100-46e3-4643-baee-2e24aa538f25', [
...         IndexUpdate('DAYS', add=pd.Series(['Saturday', 'Sunday']),
...                             remove=pd.Index(['Wednesday', 'Thursday']))])			
Add the values Saturday and Sunday to the index DAYS, using Polars data types:
>>> with ins.InsightRestClient(insight_url='http://localhost:8080/') as client:
...     client.update_scenario_data('570b9100-46e3-4643-baee-2e24aa538f25', [
...         IndexUpdate('DAYS', add=pl.Series(['Saturday', 'Sunday']))])			
Further information
Whichever data type is used when passing the 'add' and 'remove' lists, it must contain values of the required type for this set entity.
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.