dayofyear¶
In [ ]:
dayofyear(expr)
Returns the day of the year as an integer, where January 1 is day 1.
Parameters¶
| Name | Type | Optional | Description |
|---|---|---|---|
expr | object | ❌ | Expression. |
In [5]:
from verticapy import *
df = tablesample({"x": ['11-03-1993 12:00:00', '09-05-1959 03:00:00']}).to_vdf()
df["x"].astype("timestamp")
display(df)
In [6]:
# Importing the stats module
import verticapy.stats as st
# Applying the dayofyear function
df["dayofyear_x"] = st.dayofyear(df["x"])
display(df)
