pct_change(periods: number = 1): Series {
    if (typeof periods !== 'number' || !Number.isInteger(periods))
      throw new Error('periods must be an integer');
    if (periods <= 0)
      throw new Error('periods must be positive');

    return new Series(
      Immutable.Repeat(null, periods).toList().concat(
        Immutable.Range(periods, this.length).map(idx =>
          (this.values.get(idx) / this.values.get(idx - periods)) - 1).toList()),
      {index: this.index, name: this.name});
  }
Return the percentage change over a given number of periods

pandas equivalent: [Series.pct_change](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.Series.pct_change.html)

@param {number} periods=1
 Number of periods to use for percentage change calculation

@returns {Series}

@example
const ds = new Series([1, 2, 3, 4, 5], {name: 'New Series'})

ds.pct_change(1)    // Series([null, 1, 0.5, 0.333, 0.25], {name: 'New Series'})
ds.pct_change(2)    // Series([null, null, 2, 1, 0.66666], {name: 'New Series'})