pygsti.tools.typeddict

The TypedDict class

Module Contents

Classes

TypedDict

A dictionary that holds per-key type information.

class pygsti.tools.typeddict.TypedDict(types=None, items=())

Bases: dict

A dictionary that holds per-key type information.

This type of dict is used for the “leaves” in a tree of nested NamedDict objects, specifying a collection of data of different types pertaining to some set of category labels (the index-path of the named dictionaries).

When converted to a data frame, each key specifies a different column and values contribute the values of a single data frame row. Columns will be series of the held data types.

Parameters

typesdict, optional

Keys are the keys that can appear in this dictionary, and values are valid data frame type strings, e.g. “int”, “float”, or “category”, that specify the type of each value.

itemsdict or list

Initial data, used for serialization.

Initialize self. See help(type(self)) for accurate signature.

as_dataframe()

Render this dict as a pandas data frame.

Returns

pandas.DataFrame