vDataFrame.last¶
In [ ]:
vDataFrame.last(ts: str,
offset: str)
Filters the vDataFrame by only keeping the last records.
Parameters¶
| Name | Type | Optional | Description |
|---|---|---|---|
ts | str | ❌ | TS (Time Series) vcolumn to use to filter the data. The vcolumn type must be date like (date, datetime, timestamp...) |
offset | str | ❌ | Interval offset. For example, to filter and keep only the last 6 months of records, offset should be set to '6 months'. |
In [22]:
from verticapy.datasets import load_smart_meters
sm = load_smart_meters()
display(sm)
In [23]:
sm.last(ts = "time", offset = "12 hours")
Out[23]:
See Also¶
| vDataFrame.at_time | Filters the data at the input time. |
| vDataFrame.between_time | Filters the data between two time ranges. |
| vDataFrame.first | Filters the data by only keeping the first records. |
| vDataFrame.filter | Filters the data using the input expression. |
