gs_quant.timeseries.datetime.month

month(x)[source]

Month of each value in series

Parameters:

x (Series) – time series

Return type:

Series

Returns:

month of observations

Usage

Returns the month as a numeric value for each observation in the series:

\(Y_t = month(t)\)

Month of the time or date is the integer month number, e.g. 1-12

Examples

Day for observations in series:

>>> series = generate_series(100)
>>> days = month(series)

See also

day() year()