Initializing help system before first use

xpressinsight.AppInterface.capture

Purpose
Sets the list of entities to be saved back to the Insight scenario at the end of the current execution mode.
Synopsis
xpressinsight.AppInterface.capture(self, entities: Union[Iterable[str], Iterable[EntityBase]] = None, *, entity_filter: Callable[[Entity], bool] = None) -> None
Arguments
entities 
The entities to be captured. May be specified as a list of entity names or entity objects. If names are specified, columns can be identified using the pattern "<frame_name>.<col_name>" or by using their entity names (by default "<frame_name>_<col_name>"). If a DataFrame is specified, then we will capture all columns in the frame declared with either manage=RESULT or update_after_execution=True.
entity_filter 
If specified, the given function will be called for each Entity and that entity will be captured if the function returned True.
Return value

This function may raise the following errors:

  RuntimeError

If called from an execution mode declared with clear_input=True

  KeyError

If a specified entity name cannot be found.

  TypeError

If a specified entity is not a result or updateable-input entity.

  InterfaceError

If there is some other error communicating with the Insight worker.

Example
Demonstration of capturing named entities
>>> import xpressinsight as xi
...
... @xi.AppConfig("My App")
... class InsightApp(xi.AppBase):
...     @xi.ExecModeLoad()
...     def load(self):
...         self.insight.capture(['profit', 'factories_frame'])			
Demonstration of capturing all entities starting 'factor'
>>> import xpressinsight as xi
...
... @xi.AppConfig("My App")
... class InsightApp(xi.AppBase):
...     @xi.ExecModeLoad()
...     def load(self):
...         self.insight.capture(
...             entity_filter=lambda e: e.entity_name.startswith('factor'))			
Further information
1. The method capture is part of the class xpressinsight.AppInterface.
2. If this function is not called, then the values of all result and updateable input entities will be captured at the end of the execution mode.
3. This function cannot be called from an execution mode with clear_input=True; in these execution modes, all input entities will be captured and this behavior cannot be changed.
4. When specifying an indexed entity (e.g. a Series or DataFrame), the index entities will automatically be captured as well.
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.