month¶
In [ ]:
month(expr)
Returns the month portion of the specified date as an integer.
Parameters¶
| Name | Type | Optional | Description |
|---|---|---|---|
expr | object | ❌ | Expression. |
In [16]:
from verticapy import *
df = tablesample({"x": ['11-03-1993 12:05:10.23', '09-05-1959 03:10:20.12']}).to_vdf()
df["x"].astype("timestamp")
display(df)
In [17]:
# Importing the stats module
import verticapy.stats as st
# Applying the month function
df["month_x"] = st.month(df["x"])
display(df)
