vDataFrame.cummin¶
In [ ]:
vDataFrame.cummin(column: str,
by: list = [],
order_by = [],
name: str = "")
Adds a new vcolumn to the vDataFrame by computing the cumulative minimum of the input vcolumn.
Parameters¶
| Name | Type | Optional | Description |
|---|---|---|---|
column | str | ❌ | Input vcolumn. |
by | list | ✓ | vcolumns used in the partition. |
order_by | dict / list | ✓ | List of the vcolumns to use to sort the data using asc order or dictionary of all the sorting methods. For example, to sort by "column1" ASC and "column2" DESC, write {"column1": "asc", "column2": "desc"} |
name | str | ✓ | Name of the new vcolumn. If empty, a default name will be generated. |
Returns¶
vDataFrame : self
Example¶
In [11]:
from verticapy.datasets import load_amazon
amazon = load_amazon()
amazon = amazon.search("date BETWEEN '2005-05-01' AND '2006-02-01'")
display(amazon)
In [12]:
amazon.cummin(column = "number",
by = ["state"],
order_by = ["date"],
name = "cummin_number")
Out[12]:
In [13]:
x = amazon["cummin_number"].plot(ts = "date", by = "state")
See Also¶
| vDataFrame.rolling | Computes a customized moving window. |
