Cells

class Cells(_impl)[source]

Data container with a formula to calculate its own values.

Cells are created by new_cells() method or its variant methods of the containing Space, or by function definitions with modelx.defcells() decorator.

Basic properties

name

Name of the object.

fullname

Dotted name of the object.

doc

Description string

allow_none

Whether a cells can have None as its value.

model

The model this object belongs to.

parent

The parent of this object.

properties

set_property(name, value)

Set property name

Cells operations

copy(parent[, name])

Make a copy of itself

Value operations

clear()

Clear all calculated values.

clear_all()

Clear all values.

clear_at(*args, **kwargs)

Clear value for given arguments.

is_input(*args, **kwargs)

True if this is input.

match(*args, **kwargs)

Returns the best matching args and their value.

value

Get, set, delete the scalar value.

Formula operations

formula

Property to get, set, delete formula.

set_formula(func)

Set formula from a function.

clear_formula()

Clear the formula.

parameters

A tuple of parameter strings.

Element operations

node(*args, **kwargs)

Return a Element object for the given arguments.

preds(*args, **kwargs)

Return a list of predecessors of a cell.

succs(*args, **kwargs)

Return a list of successors of a cell.

Exporting to Pandas objects

series

Alias of to_series().

frame

Alias of to_frame().

to_series(*args)

Convert the cells itself into a Pandas Series and return it.

to_frame(*args)

Convert the cells itself into a Pandas DataFrame and return it.