out_table.TableRenderer.sum

tools.out_table.TableRenderer.sum(
    geo,
    time,
    quantity,
    *,
    ordering='location',
    result_format='dataframe',
)

Renders a table showing summed values over time for the given selections.

Because it is not valid to sum compartment values over time – this would be double-counting individuals in a way that has no physical meaning – compartment quantities are automatically omitted even if they are part of the selection, so only events are reflected in the result.

Parameters

geo: GeoSelection | GeoAggregation

the geographic selection to make on the output data

time: TimeSelection | TimeAggregation

the time selection to make on the output data

quantity: QuantitySelection | QuantityAggregation

the quantity selection to make on the output data

ordering: (location, quantity) = “location”

controls the ordering of rows in the result; both location and quantity are used to sort the resulting rows, this just decides which gets priority

result_format: (dataframe, string, print) = “dataframe”

controls the type of the result of this method; “dataframe” returns a Pandas DataFrame, “string” returns the stringified table, and “print” just prints the stringified table directly and returns None

Returns

DataFrame | str | None

according to the value of the result_format parameter