def get_trend(row, window_size, center=True):
    """
    Returns trend component of a time series
    :param row: pandas series containing the time series to extract seasonality from
    :param window_size: length of moving window
    :param center:
    :return:
    """
    trend = row.rolling(window_size, center=center).mean()

    return trend