gs_quant.timeseries.datetime.year — gs_quant 0.1 documentation

# gs_quant.timeseries.datetime.year

`year`(x)

  Year of each value in series

  Parameters

    x (`Series`) – time series

  Return type

    `Series`

  Returns

    year of observations

  Usage

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

  \(Y_t = year(t)\)

  Year of the time or date is the integer year number, e.g. 2019, 2020

  Examples

  Year for observations in series:

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

  See also

  `day()` `month()`