linearmodels.shared.utility.AttrDict

class linearmodels.shared.utility.AttrDict(*args: Mapping[Any, Any] | Sequence[tuple[Any, Any]], **kwargs: Any)[source]

Ordered dictionary-like object that exposes keys as attributes.

Parameters:
*args: Mapping[Any, Any] | Sequence[tuple[Any, Any]]

A mapping, or a sequence of (key, value) pairs, with the initial items. The arguments are those of dict.

**kwargs: Any

Items to add, with the names of the keyword arguments as keys.

Methods

clear()

Remove all items from AD.

copy()

Create a shallow copy of AD.

items()

Return an ordered list-like object providing a view on AD's items.

keys()

Return an ordered list-like object providing a view on AD's keys.

pop(key[, default])

Remove specified key and return the corresponding value.

update(*args, **kwargs)

Update AD from dictionary or iterable E and F.

values()

Return an ordered list-like object providing a view on AD's values.