/// <summary> /// Performs an element-wise boolean Or on each column /// </summary> public DataFrame Or(bool value, bool inPlace = false) { DataFrame retDataFrame = inPlace ? this : new DataFrame(); for (int i = 0; i < Columns.Count; i++) { DataFrameColumn baseColumn = _columnCollection[i]; DataFrameColumn newColumn = baseColumn.Or(value, inPlace); if (inPlace) { retDataFrame.Columns[i] = newColumn; } else { retDataFrame.Columns.Insert(i, newColumn); } } return(retDataFrame); }
public DataFrame Or(IReadOnlyList <bool> values, bool inPlace = false) { if (values.Count != Columns.Count) { throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values)); } DataFrame retDataFrame = inPlace ? this : new DataFrame(); for (int i = 0; i < Columns.Count; i++) { DataFrameColumn baseColumn = _columnCollection[i]; DataFrameColumn newColumn = baseColumn.Or(values[i], inPlace); if (inPlace) { retDataFrame.Columns[i] = newColumn; } else { retDataFrame.Columns.Insert(i, newColumn); } } return(retDataFrame); }