median(): number {
    const sortedVals = this.values.sort();

    if (this.length % 2 === 1)
      return sortedVals.get(Math.floor(this.length / 2));

    const halfLength = this.length / 2;
    return (sortedVals.get(halfLength - 1) + sortedVals.get(halfLength)) / 2;
  }
Return the median of the values in the `Series`

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

@returns {number}

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

// Returns 3
ds.median();