where(other: any, op: T_BF) {
    const name = this.name;
    const index = this.index;
    const kwargs = {name, index};

    if (!(Array.isArray(other)) && !(other instanceof Immutable.List) && !(other instanceof Series))
      return new Series(this.values.map(v => op(v, other)), kwargs);

    if (Array.isArray(other)) {
      if (other.length !== this.length) throw new Error('Must be equal length for comparison');
      return new Series(this.values.map((v, idx) => op(v, other[idx])), kwargs);
    } else if (other instanceof Immutable.List) {
      if (other.size !== this.length) throw new Error('Must be equal length for comparison');
      return new Series(this.values.map((v, idx) => op(v, other.get(idx))), kwargs);
    } else if (other instanceof Series) {
      if (other.length !== this.length) throw new Error('Must be equal length for comparison');
      return new Series(this.values.map((v, idx) => op(v, other.iloc(idx))), kwargs);
    }

    throw new Error('Must be scalar value, Array, Series, or Immutable.List');
  }
Flexible comparison of an iterable or value to the `Series`. Returns a `Series` of booleans of
equivalent length

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

@param {Series|Array|List|string|number} other
 Iterable or value compared to Series
@param {function} op
 Function which takes (a, b) values and returns a boolean
@returns {Series}

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

// Returns Series([true, false, false])
ds.where(1, (v1, v2) => v1 === 1);

// Returns Series([false, true, true])
ds.where(new Series([0, 2, 3]), (v1, v2) => v1 === v2);