riptable.Utils.rt_display_properties

Classes

DisplayConvert

Will analyze an array of a default type and return the appropriate conversion function.

ItemFormat

A container for display options for different data types in FastArray and numpy arrays.

Functions

format_scalar(sc)

Convert a scalar to a string for display - the same way it would be if contained in a FastArray.

get_array_formatter(arr)

FastArray/subclasses have display_query_properties defined for custom string formatting.

trim_string(i, itemformat)

If maxwidth was specified and is larger than the global default, it will be used instead.

Attributes

default_item_formats

class riptable.Utils.rt_display_properties.DisplayConvert

Will analyze an array of a default type and return the appropriate conversion function. Anything that subclasses from FastArray will always fall back on the dtype of its underlying array.

ConvertFuncCache
ConvertTypeCache
Verbose = 0
convert_func_dict
static convertBool(b, itemformat)
static convertBytes(i, itemformat)
static convertDefault(i, itemformat)
static convertFloat(f, itemformat)
static convertInt(i, itemformat)
static convertMultiDims(i, itemformat)

For displaying multi-dimensional arrays (currently only supports 2-dims). ItemFormat object contains a convert function for the dtype of the multidimensional array.

static convertRecord(i, itemformat)
static convertString(i, itemformat)
static get_display_array_type(dtype)

For FastArray and numpy array of basic type (not for objects that are subclasses of FastArray)

static get_display_convert(arr)
class riptable.Utils.rt_display_properties.ItemFormat(length=DisplayLength.Short, justification=DisplayJustification.Right, invalid=None, can_have_spaces=False, html=False, color=DisplayColumnColors.Default, decoration=None, convert=None, convert_format=None, format_string=None, timezone_str=None, maxwidth=None)

A container for display options for different data types in FastArray and numpy arrays. Basic numpy types have defaults. (see below) New types (subclassed from FastArray) will be queried to get formatting options. New types have the option of overwriting display_query_properties to set their own defaults.

__repr__()

Return repr(self).

__str__()

Return str(self).

copy()
summary()
riptable.Utils.rt_display_properties.format_scalar(sc)

Convert a scalar to a string for display - the same way it would be if contained in a FastArray. Returns the converted scalar.

riptable.Utils.rt_display_properties.get_array_formatter(arr)

FastArray/subclasses have display_query_properties defined for custom string formatting. Numpy arrays have defaults in DisplayConvert. Returns ItemFormat object and display function for items in array based on type.

riptable.Utils.rt_display_properties.trim_string(i, itemformat)

If maxwidth was specified and is larger than the global default, it will be used instead. See also ColumnStyle()

riptable.Utils.rt_display_properties.default_item_formats