geovizir.scales#

Module Contents#

Functions#

label_bins(→ list[str])

Return a list of labels for a list of bins.

relabel_bins(column)

Relabel a column with the bins of the column.

geovizir.scales.label_bins(bins: list[int, float]) list[str][source]#

Return a list of labels for a list of bins.

For each element of the bins, an interval is created with the previous element. The first element is add as ‘< first_element’ and the last element as ‘> last_element’.

Parameters:

bins (list[float, int]) – A list of bins to be labeled.

Returns:

A list of labels.

Return type:

list[str]

Examples

>>> bins([1,2,3])
geovizir.scales.relabel_bins(column: pandas.Series)[source]#

Relabel a column with the bins of the column.

Parameters:

column (Series) – A column to be relabeled.

Returns:

A column with the labels of the bins.

Return type:

Series