/// <summary> /// Performs an element-wise greater than on each column /// </summary> public DataFrame ElementwiseGreaterThan <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.ElementwiseGreaterThan(value); retDataFrame.Columns.Insert(i, newColumn); } return(retDataFrame); }
public DataFrame ElementwiseGreaterThan <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.ElementwiseGreaterThan(values[i]); retDataFrame.Columns.Insert(i, newColumn); } return(retDataFrame); }