/// <summary> /// Performs an element-wise less than or equal on each column /// </summary> public DataFrame ElementwiseLessThanOrEqual <T>(T value) where T : unmanaged { DataFrame retDataFrame = new DataFrame(); for (int i = 0; i < Columns.Count; i++) { DataFrameColumn baseColumn = _columnCollection[i]; DataFrameColumn newColumn = baseColumn.ElementwiseLessThanOrEqual(value); retDataFrame.Columns.Insert(i, newColumn); } return(retDataFrame); }
public DataFrame ElementwiseLessThanOrEqual <T>(IReadOnlyList <T> values) where T : unmanaged { if (values.Count != Columns.Count) { throw new ArgumentException(Strings.MismatchedColumnLengths, nameof(values)); } DataFrame retDataFrame = new DataFrame(); for (int i = 0; i < Columns.Count; i++) { DataFrameColumn baseColumn = _columnCollection[i]; DataFrameColumn newColumn = baseColumn.ElementwiseLessThanOrEqual(values[i]); retDataFrame.Columns.Insert(i, newColumn); } return(retDataFrame); }