<type>documentation</type>
<domain>debug</domain>
<id>details-view</id>
<title>Array, Data Frame, and Textual Data Views</title>
<date>$Date$</date>
<version>$Revision$</version>
<product>all</product>

The value details area of the ``Stack Data`` tool can display selected values as an array
or in textual form. The details view area is shown and hidden with ``Show Value Detail``
in the ``Stack Data`` tool's ``Options`` menu. The position of the details view can be
changed by checking or unchecking the ``Show Detail to Side`` item in the ``Options``
menu.

**Array View**

Values like Pandas DataFrames, numpy ndarrays, xarray.DataArrays, sqlite3 result sets, and
Python lists, tuples, and dicts can be viewed as an array by right-clicking on the item
and selecting ``Show Value as Array``. The array viewer loads slices of data as needed for
display, rather than loading the whole data value at once.

A filter area is provided for searching the data. Only rows that match the filters will be
shown. The filters are applied on the server side, to limit the amount of data examined
and transferred to the IDE.

Each filter can be a string to search for in any data column, or may specify the column
to search in the form ``colspec:text``.  For example, ``0:msg`` searches for the string
``msg`` only in column zero.  If column labels are shown, as they are for sqlite3 results
and some numpy and Pandas data, the column label can be used instead of the column number.
For example, ``name:oli`` will search the ``name`` column for the string ``oli``.

If multiple space-separated filters are entered, they must all match a row for that
row to be displayed.

Filtering options are accessed by clicking on the drop down arrow to the right of the filter
enter area:

* ``Case Sensitive`` can be checked for case-sensitive searching, for both the 
  search string and any column specifiers.
  
* ``Text Search``, ``Wildcard Search``, and ``Regex Search`` select the
  type of matching to use.
  
* ``Search All Columns`` and ``Search Visible Columns`` select whether your
  filters are applied only to the visible range of columns, or to all columns.
  The default is to filter only on visible columns since filtering on all
  columns can be very slow in large arrays.

The array view can also display array-like instances that implement ``__len__`` and
``__getitem__`` and dict-like instances that implement ``keys`` and ``__getitem__`` if the
`Debugger > Introspection > Allow Calls in Introspection
<script:show_preferences_gui#prefname="debug.allow-dynamic-introspection">`__ preference
is enabled. This should be used with caution because it invokes these user-defined methods
in a way that may be untested, possibly leading to unexpected changes in runtime state,
hanging, threading deadlocks, or crashing.

**Textual View**

When the debugger encounters a long string, it will be truncated in the
``Value`` column.  In this case, the full value of the string can be viewed in the
details area by right-clicking on a value and selecting ``Show Value as Text``.

This can be useful in some other cases as well, where the textual representation
of a value is easlier to read than the tree or array view.
