8 types derived from DataFrameColumn
Microsoft.Data.Analysis (8)
DataFrameColumns\ArrowStringDataFrameColumn.cs (1)
21public partial class ArrowStringDataFrameColumn : DataFrameColumn, IEnumerable<string>
DataFrameColumns\StringDataFrameColumn.cs (1)
19public partial class StringDataFrameColumn : DataFrameColumn, IEnumerable<string>
DataFrameColumns\VBufferDataFrameColumn.cs (1)
18public partial class VBufferDataFrameColumn<T> : DataFrameColumn, IEnumerable<VBuffer<T>>
PrimitiveDataFrameColumn.BinaryOperations.cs (1)
14public partial class PrimitiveDataFrameColumn<T> : DataFrameColumn
PrimitiveDataFrameColumn.Computations.cs (1)
15public partial class PrimitiveDataFrameColumn<T> : DataFrameColumn
PrimitiveDataFrameColumn.cs (1)
23public partial class PrimitiveDataFrameColumn<T> : DataFrameColumn, IEnumerable<T?>
PrimitiveDataFrameColumn.Sort.cs (1)
12public partial class PrimitiveDataFrameColumn<T> : DataFrameColumn
StringDataFrameColumn.BinaryOperations.cs (1)
13public partial class StringDataFrameColumn : DataFrameColumn
860 references to DataFrameColumn
Microsoft.Data.Analysis (654)
DataFrame.Arrow.cs (4)
17DataFrameColumn dataFrameColumn = null; 180DataFrameColumn column = Columns[i]; 197DataFrameColumn column = Columns[i]; 202DataFrameColumn column = Columns[i];
DataFrame.BinaryOperations.cs (76)
26DataFrameColumn baseColumn = _columnCollection[i]; 27DataFrameColumn newColumn = baseColumn.Add(values[i], inPlace); 45DataFrameColumn baseColumn = _columnCollection[i]; 46DataFrameColumn newColumn = baseColumn.Add(value, inPlace); 65DataFrameColumn baseColumn = _columnCollection[i]; 66DataFrameColumn newColumn = baseColumn.Subtract(values[i], inPlace); 84DataFrameColumn baseColumn = _columnCollection[i]; 85DataFrameColumn newColumn = baseColumn.Subtract(value, inPlace); 104DataFrameColumn baseColumn = _columnCollection[i]; 105DataFrameColumn newColumn = baseColumn.Multiply(values[i], inPlace); 123DataFrameColumn baseColumn = _columnCollection[i]; 124DataFrameColumn newColumn = baseColumn.Multiply(value, inPlace); 143DataFrameColumn baseColumn = _columnCollection[i]; 144DataFrameColumn newColumn = baseColumn.Divide(values[i], inPlace); 162DataFrameColumn baseColumn = _columnCollection[i]; 163DataFrameColumn newColumn = baseColumn.Divide(value, inPlace); 182DataFrameColumn baseColumn = _columnCollection[i]; 183DataFrameColumn newColumn = baseColumn.Modulo(values[i], inPlace); 201DataFrameColumn baseColumn = _columnCollection[i]; 202DataFrameColumn newColumn = baseColumn.Modulo(value, inPlace); 220DataFrameColumn baseColumn = _columnCollection[i]; 221DataFrameColumn newColumn = baseColumn.And(values[i], inPlace); 238DataFrameColumn baseColumn = _columnCollection[i]; 239DataFrameColumn newColumn = baseColumn.And(value, inPlace); 257DataFrameColumn baseColumn = _columnCollection[i]; 258DataFrameColumn newColumn = baseColumn.Or(values[i], inPlace); 275DataFrameColumn baseColumn = _columnCollection[i]; 276DataFrameColumn newColumn = baseColumn.Or(value, inPlace); 294DataFrameColumn baseColumn = _columnCollection[i]; 295DataFrameColumn newColumn = baseColumn.Xor(values[i], inPlace); 312DataFrameColumn baseColumn = _columnCollection[i]; 313DataFrameColumn newColumn = baseColumn.Xor(value, inPlace); 330DataFrameColumn baseColumn = _columnCollection[i]; 331DataFrameColumn newColumn = baseColumn.LeftShift(value, inPlace); 348DataFrameColumn baseColumn = _columnCollection[i]; 349DataFrameColumn newColumn = baseColumn.RightShift(value, inPlace); 368DataFrameColumn baseColumn = _columnCollection[i]; 369DataFrameColumn newColumn = baseColumn.ElementwiseEquals(values[i]); 384DataFrameColumn baseColumn = _columnCollection[i]; 385DataFrameColumn newColumn = baseColumn.ElementwiseEquals(value); 401DataFrameColumn baseColumn = _columnCollection[i]; 402DataFrameColumn newColumn = baseColumn.ElementwiseNotEquals(values[i]); 417DataFrameColumn baseColumn = _columnCollection[i]; 418DataFrameColumn newColumn = baseColumn.ElementwiseNotEquals(value); 434DataFrameColumn baseColumn = _columnCollection[i]; 435DataFrameColumn newColumn = baseColumn.ElementwiseGreaterThanOrEqual(values[i]); 450DataFrameColumn baseColumn = _columnCollection[i]; 451DataFrameColumn newColumn = baseColumn.ElementwiseGreaterThanOrEqual(value); 467DataFrameColumn baseColumn = _columnCollection[i]; 468DataFrameColumn newColumn = baseColumn.ElementwiseLessThanOrEqual(values[i]); 483DataFrameColumn baseColumn = _columnCollection[i]; 484DataFrameColumn newColumn = baseColumn.ElementwiseLessThanOrEqual(value); 500DataFrameColumn baseColumn = _columnCollection[i]; 501DataFrameColumn newColumn = baseColumn.ElementwiseGreaterThan(values[i]); 516DataFrameColumn baseColumn = _columnCollection[i]; 517DataFrameColumn newColumn = baseColumn.ElementwiseGreaterThan(value); 533DataFrameColumn baseColumn = _columnCollection[i]; 534DataFrameColumn newColumn = baseColumn.ElementwiseLessThan(values[i]); 549DataFrameColumn baseColumn = _columnCollection[i]; 550DataFrameColumn newColumn = baseColumn.ElementwiseLessThan(value); 565DataFrameColumn baseColumn = _columnCollection[i]; 566DataFrameColumn newColumn = baseColumn.ReverseAdd(value, inPlace); 583DataFrameColumn baseColumn = _columnCollection[i]; 584DataFrameColumn newColumn = baseColumn.ReverseSubtract(value, inPlace); 601DataFrameColumn baseColumn = _columnCollection[i]; 602DataFrameColumn newColumn = baseColumn.ReverseMultiply(value, inPlace); 619DataFrameColumn baseColumn = _columnCollection[i]; 620DataFrameColumn newColumn = baseColumn.ReverseDivide(value, inPlace); 637DataFrameColumn baseColumn = _columnCollection[i]; 638DataFrameColumn newColumn = baseColumn.ReverseModulo(value, inPlace); 654DataFrameColumn baseColumn = _columnCollection[i]; 655DataFrameColumn newColumn = baseColumn.ReverseAnd(value, inPlace); 671DataFrameColumn baseColumn = _columnCollection[i]; 672DataFrameColumn newColumn = baseColumn.ReverseOr(value, inPlace); 688DataFrameColumn baseColumn = _columnCollection[i]; 689DataFrameColumn newColumn = baseColumn.ReverseXor(value, inPlace);
DataFrame.cs (31)
44public DataFrame(IEnumerable<DataFrameColumn> columns) 50public DataFrame(params DataFrameColumn[] columns) 154/// An indexer based on <see cref="DataFrameColumn.Name"/> 156/// <param name="columnName">The name of a <see cref="DataFrameColumn"/></param> 157/// <returns>A <see cref="DataFrameColumn"/> if it exists.</returns> 159public DataFrameColumn this[string columnName] 198private DataFrame Clone(DataFrameColumn mapIndices = null) 200List<DataFrameColumn> newColumns = new List<DataFrameColumn>(Columns.Count); 216foreach (DataFrameColumn column in Columns) 239foreach (DataFrameColumn column in Columns) 294DataFrameColumn column = ret.Columns[i]; 309DataFrameColumn column = df.Columns[i]; 324DataFrameColumn column = df.Columns[i]; 373DataFrameColumn column = _columnCollection[columnIndex]; 389DataFrameColumn column = this[columnName]; 421foreach (var column in Columns) 441foreach (var column in Columns) 494private void ResizeByOneAndAppend(DataFrameColumn column, object value) 536IEnumerator<DataFrameColumn> columnEnumerator = ret.Columns.GetEnumerator(); 546DataFrameColumn column = columnEnumerator.Current; 585DataFrameColumn column = columnEnumerator.Current; 596DataFrameColumn column = columnEnumerator.Current; 634DataFrameColumn column = ret.Columns[index]; 653DataFrameColumn column = ret.Columns[index]; 659foreach (DataFrameColumn column in ret.Columns) 680DataFrameColumn column = Columns[columnName]; 683List<DataFrameColumn> newColumns = new List<DataFrameColumn>(Columns.Count); 686DataFrameColumn oldColumn = Columns[i]; 687DataFrameColumn newColumn = oldColumn.Clone(sortIndices);
DataFrame.IDataView.cs (2)
31DataFrameColumn baseColumn = Columns[i]; 110DataFrameColumn column = _dataFrame.Columns[col];
DataFrame.IO.cs (10)
124var columns = new List<DataFrameColumn>(columnsCount); 128var column = CreateColumn(type, name); 148foreach (var column in Columns) 185var columns = new DataFrameColumn[columnsCount]; 191var column = CreateColumn(type, name); 280private static DataFrameColumn CreateColumn(Type kind, string columnName) 282DataFrameColumn ret; 350private static DataFrameColumn CreateColumn(Type kind, string[] columnNames, int columnIndex) 372List<DataFrameColumn> columns; 441columns = new List<DataFrameColumn>(numberOfColumns);
DataFrame.Join.cs (15)
26private void SetSuffixForDuplicatedColumnNames(DataFrame dataFrame, DataFrameColumn column, string leftSuffix, string rightSuffix) 32DataFrameColumn existingColumn = dataFrame.Columns[index]; 54DataFrameColumn newColumn = Columns[i].Clone(); 65DataFrameColumn newColumn; 88DataFrameColumn newColumn; 101DataFrameColumn newColumn = other.Columns[i].Clone(); 112DataFrameColumn newColumn = Columns[i].Clone(numberOfNullsToAppend: numberOfNulls); 118DataFrameColumn newColumn = other.Columns[i].Clone(numberOfNullsToAppend: numberOfNulls); 133DataFrameColumn newColumn = Columns[i].Clone(mapIndices); 138DataFrameColumn newColumn = other.Columns[i].Clone(mapIndices); 146private static bool IsAnyNullValueInColumns(IReadOnlyCollection<DataFrameColumn> columns, long index) 148foreach (var column in columns) 204DataFrameColumn shrinkedRetainedColumn = retainedDataFrame.Columns[retainedJoinColumnNames[colNameIndex]]; 228DataFrameColumn supplementaryColumn = supplementaryDataFrame.Columns[supplemetaryJoinColumnNames[colNameIndex]]; 418DataFrameColumn column = other.Columns[i].Clone(mapIndicesRight);
DataFrameColumn.BinaryOperations.cs (34)
18public virtual DataFrameColumn Add(DataFrameColumn column, bool inPlace = false) 26public virtual DataFrameColumn Add<T>(T value, bool inPlace = false) 34public virtual DataFrameColumn ReverseAdd<T>(T value, bool inPlace = false) 42public virtual DataFrameColumn Subtract(DataFrameColumn column, bool inPlace = false) 50public virtual DataFrameColumn Subtract<T>(T value, bool inPlace = false) 58public virtual DataFrameColumn ReverseSubtract<T>(T value, bool inPlace = false) 66public virtual DataFrameColumn Multiply(DataFrameColumn column, bool inPlace = false) 74public virtual DataFrameColumn Multiply<T>(T value, bool inPlace = false) 82public virtual DataFrameColumn ReverseMultiply<T>(T value, bool inPlace = false) 90public virtual DataFrameColumn Divide(DataFrameColumn column, bool inPlace = false) 98public virtual DataFrameColumn Divide<T>(T value, bool inPlace = false) 106public virtual DataFrameColumn ReverseDivide<T>(T value, bool inPlace = false) 114public virtual DataFrameColumn Modulo(DataFrameColumn column, bool inPlace = false) 122public virtual DataFrameColumn Modulo<T>(T value, bool inPlace = false) 130public virtual DataFrameColumn ReverseModulo<T>(T value, bool inPlace = false) 138public virtual DataFrameColumn And(DataFrameColumn column, bool inPlace = false) 162public virtual DataFrameColumn Or(DataFrameColumn column, bool inPlace = false) 186public virtual DataFrameColumn Xor(DataFrameColumn column, bool inPlace = false) 210public virtual DataFrameColumn LeftShift(int value, bool inPlace = false) 218public virtual DataFrameColumn RightShift(int value, bool inPlace = false) 226public virtual PrimitiveDataFrameColumn<bool> ElementwiseEquals(DataFrameColumn column) 242public virtual PrimitiveDataFrameColumn<bool> ElementwiseNotEquals(DataFrameColumn column) 258public virtual PrimitiveDataFrameColumn<bool> ElementwiseGreaterThanOrEqual(DataFrameColumn column) 274public virtual PrimitiveDataFrameColumn<bool> ElementwiseLessThanOrEqual(DataFrameColumn column) 290public virtual PrimitiveDataFrameColumn<bool> ElementwiseGreaterThan(DataFrameColumn column) 306public virtual PrimitiveDataFrameColumn<bool> ElementwiseLessThan(DataFrameColumn column)
DataFrameColumn.BinaryOperators.cs (260)
16public static DataFrameColumn operator +(DataFrameColumn left, DataFrameColumn right) 21public static DataFrameColumn operator +(DataFrameColumn column, byte value) 26public static DataFrameColumn operator +(byte value, DataFrameColumn column) 31public static DataFrameColumn operator +(DataFrameColumn column, decimal value) 36public static DataFrameColumn operator +(decimal value, DataFrameColumn column) 41public static DataFrameColumn operator +(DataFrameColumn column, double value) 46public static DataFrameColumn operator +(double value, DataFrameColumn column) 51public static DataFrameColumn operator +(DataFrameColumn column, float value) 56public static DataFrameColumn operator +(float value, DataFrameColumn column) 61public static DataFrameColumn operator +(DataFrameColumn column, int value) 66public static DataFrameColumn operator +(int value, DataFrameColumn column) 71public static DataFrameColumn operator +(DataFrameColumn column, long value) 76public static DataFrameColumn operator +(long value, DataFrameColumn column) 81public static DataFrameColumn operator +(DataFrameColumn column, sbyte value) 86public static DataFrameColumn operator +(sbyte value, DataFrameColumn column) 91public static DataFrameColumn operator +(DataFrameColumn column, short value) 96public static DataFrameColumn operator +(short value, DataFrameColumn column) 101public static DataFrameColumn operator +(DataFrameColumn column, uint value) 106public static DataFrameColumn operator +(uint value, DataFrameColumn column) 111public static DataFrameColumn operator +(DataFrameColumn column, ulong value) 116public static DataFrameColumn operator +(ulong value, DataFrameColumn column) 121public static DataFrameColumn operator +(DataFrameColumn column, ushort value) 126public static DataFrameColumn operator +(ushort value, DataFrameColumn column) 132public static DataFrameColumn operator -(DataFrameColumn left, DataFrameColumn right) 137public static DataFrameColumn operator -(DataFrameColumn column, byte value) 142public static DataFrameColumn operator -(byte value, DataFrameColumn column) 147public static DataFrameColumn operator -(DataFrameColumn column, decimal value) 152public static DataFrameColumn operator -(decimal value, DataFrameColumn column) 157public static DataFrameColumn operator -(DataFrameColumn column, double value) 162public static DataFrameColumn operator -(double value, DataFrameColumn column) 167public static DataFrameColumn operator -(DataFrameColumn column, float value) 172public static DataFrameColumn operator -(float value, DataFrameColumn column) 177public static DataFrameColumn operator -(DataFrameColumn column, int value) 182public static DataFrameColumn operator -(int value, DataFrameColumn column) 187public static DataFrameColumn operator -(DataFrameColumn column, long value) 192public static DataFrameColumn operator -(long value, DataFrameColumn column) 197public static DataFrameColumn operator -(DataFrameColumn column, sbyte value) 202public static DataFrameColumn operator -(sbyte value, DataFrameColumn column) 207public static DataFrameColumn operator -(DataFrameColumn column, short value) 212public static DataFrameColumn operator -(short value, DataFrameColumn column) 217public static DataFrameColumn operator -(DataFrameColumn column, uint value) 222public static DataFrameColumn operator -(uint value, DataFrameColumn column) 227public static DataFrameColumn operator -(DataFrameColumn column, ulong value) 232public static DataFrameColumn operator -(ulong value, DataFrameColumn column) 237public static DataFrameColumn operator -(DataFrameColumn column, ushort value) 242public static DataFrameColumn operator -(ushort value, DataFrameColumn column) 248public static DataFrameColumn operator *(DataFrameColumn left, DataFrameColumn right) 253public static DataFrameColumn operator *(DataFrameColumn column, byte value) 258public static DataFrameColumn operator *(byte value, DataFrameColumn column) 263public static DataFrameColumn operator *(DataFrameColumn column, decimal value) 268public static DataFrameColumn operator *(decimal value, DataFrameColumn column) 273public static DataFrameColumn operator *(DataFrameColumn column, double value) 278public static DataFrameColumn operator *(double value, DataFrameColumn column) 283public static DataFrameColumn operator *(DataFrameColumn column, float value) 288public static DataFrameColumn operator *(float value, DataFrameColumn column) 293public static DataFrameColumn operator *(DataFrameColumn column, int value) 298public static DataFrameColumn operator *(int value, DataFrameColumn column) 303public static DataFrameColumn operator *(DataFrameColumn column, long value) 308public static DataFrameColumn operator *(long value, DataFrameColumn column) 313public static DataFrameColumn operator *(DataFrameColumn column, sbyte value) 318public static DataFrameColumn operator *(sbyte value, DataFrameColumn column) 323public static DataFrameColumn operator *(DataFrameColumn column, short value) 328public static DataFrameColumn operator *(short value, DataFrameColumn column) 333public static DataFrameColumn operator *(DataFrameColumn column, uint value) 338public static DataFrameColumn operator *(uint value, DataFrameColumn column) 343public static DataFrameColumn operator *(DataFrameColumn column, ulong value) 348public static DataFrameColumn operator *(ulong value, DataFrameColumn column) 353public static DataFrameColumn operator *(DataFrameColumn column, ushort value) 358public static DataFrameColumn operator *(ushort value, DataFrameColumn column) 364public static DataFrameColumn operator /(DataFrameColumn left, DataFrameColumn right) 369public static DataFrameColumn operator /(DataFrameColumn column, byte value) 374public static DataFrameColumn operator /(byte value, DataFrameColumn column) 379public static DataFrameColumn operator /(DataFrameColumn column, decimal value) 384public static DataFrameColumn operator /(decimal value, DataFrameColumn column) 389public static DataFrameColumn operator /(DataFrameColumn column, double value) 394public static DataFrameColumn operator /(double value, DataFrameColumn column) 399public static DataFrameColumn operator /(DataFrameColumn column, float value) 404public static DataFrameColumn operator /(float value, DataFrameColumn column) 409public static DataFrameColumn operator /(DataFrameColumn column, int value) 414public static DataFrameColumn operator /(int value, DataFrameColumn column) 419public static DataFrameColumn operator /(DataFrameColumn column, long value) 424public static DataFrameColumn operator /(long value, DataFrameColumn column) 429public static DataFrameColumn operator /(DataFrameColumn column, sbyte value) 434public static DataFrameColumn operator /(sbyte value, DataFrameColumn column) 439public static DataFrameColumn operator /(DataFrameColumn column, short value) 444public static DataFrameColumn operator /(short value, DataFrameColumn column) 449public static DataFrameColumn operator /(DataFrameColumn column, uint value) 454public static DataFrameColumn operator /(uint value, DataFrameColumn column) 459public static DataFrameColumn operator /(DataFrameColumn column, ulong value) 464public static DataFrameColumn operator /(ulong value, DataFrameColumn column) 469public static DataFrameColumn operator /(DataFrameColumn column, ushort value) 474public static DataFrameColumn operator /(ushort value, DataFrameColumn column) 480public static DataFrameColumn operator %(DataFrameColumn left, DataFrameColumn right) 485public static DataFrameColumn operator %(DataFrameColumn column, byte value) 490public static DataFrameColumn operator %(byte value, DataFrameColumn column) 495public static DataFrameColumn operator %(DataFrameColumn column, decimal value) 500public static DataFrameColumn operator %(decimal value, DataFrameColumn column) 505public static DataFrameColumn operator %(DataFrameColumn column, double value) 510public static DataFrameColumn operator %(double value, DataFrameColumn column) 515public static DataFrameColumn operator %(DataFrameColumn column, float value) 520public static DataFrameColumn operator %(float value, DataFrameColumn column) 525public static DataFrameColumn operator %(DataFrameColumn column, int value) 530public static DataFrameColumn operator %(int value, DataFrameColumn column) 535public static DataFrameColumn operator %(DataFrameColumn column, long value) 540public static DataFrameColumn operator %(long value, DataFrameColumn column) 545public static DataFrameColumn operator %(DataFrameColumn column, sbyte value) 550public static DataFrameColumn operator %(sbyte value, DataFrameColumn column) 555public static DataFrameColumn operator %(DataFrameColumn column, short value) 560public static DataFrameColumn operator %(short value, DataFrameColumn column) 565public static DataFrameColumn operator %(DataFrameColumn column, uint value) 570public static DataFrameColumn operator %(uint value, DataFrameColumn column) 575public static DataFrameColumn operator %(DataFrameColumn column, ulong value) 580public static DataFrameColumn operator %(ulong value, DataFrameColumn column) 585public static DataFrameColumn operator %(DataFrameColumn column, ushort value) 590public static DataFrameColumn operator %(ushort value, DataFrameColumn column) 596public static DataFrameColumn operator &(DataFrameColumn left, DataFrameColumn right) 601public static DataFrameColumn operator &(DataFrameColumn column, bool value) 606public static DataFrameColumn operator &(bool value, DataFrameColumn column) 611public static DataFrameColumn operator |(DataFrameColumn left, DataFrameColumn right) 616public static DataFrameColumn operator |(DataFrameColumn column, bool value) 621public static DataFrameColumn operator |(bool value, DataFrameColumn column) 626public static DataFrameColumn operator ^(DataFrameColumn left, DataFrameColumn right) 631public static DataFrameColumn operator ^(DataFrameColumn column, bool value) 636public static DataFrameColumn operator ^(bool value, DataFrameColumn column) 641public static DataFrameColumn operator <<(DataFrameColumn column, int value) 646public static DataFrameColumn operator >>(DataFrameColumn column, int value)
DataFrameColumn.Computations.cs (10)
18public virtual DataFrameColumn Abs(bool inPlace = false) 42public virtual DataFrameColumn CumulativeMax(bool inPlace = false) 50public virtual DataFrameColumn CumulativeMax(IEnumerable<long> rowIndices, bool inPlace = false) 58public virtual DataFrameColumn CumulativeMin(bool inPlace = false) 66public virtual DataFrameColumn CumulativeMin(IEnumerable<long> rowIndices, bool inPlace = false) 74public virtual DataFrameColumn CumulativeProduct(bool inPlace = false) 82public virtual DataFrameColumn CumulativeProduct(IEnumerable<long> rowIndices, bool inPlace = false) 90public virtual DataFrameColumn CumulativeSum(bool inPlace = false) 98public virtual DataFrameColumn CumulativeSum(IEnumerable<long> rowIndices, bool inPlace = false) 170public virtual DataFrameColumn Round(bool inPlace = false)
DataFrameColumn.cs (27)
22/// The base <see cref="DataFrameColumn"/> constructor. 216/// <returns>A new <see cref="DataFrameColumn"/></returns> 217public DataFrameColumn Clone(long numberOfNullsToAppend = 0) => CloneImplementation(numberOfNullsToAppend); 225/// <returns>A new <see cref="DataFrameColumn"/></returns> 226public DataFrameColumn Clone(DataFrameColumn mapIndices, bool invertMapIndices = false, long numberOfNullsToAppend = 0) => CloneImplementation(mapIndices, invertMapIndices, numberOfNullsToAppend); 234/// <returns>A new <see cref="DataFrameColumn"/></returns> 235protected abstract DataFrameColumn CloneImplementation(DataFrameColumn mapIndices, bool invertMapIndices, long numberOfNullsToAppend); 237protected abstract DataFrameColumn CloneImplementation(long numberOfNullsToAppend = 0); 244public DataFrameColumn Sort(bool ascending = true, bool putNullValuesLast = true) 263public abstract Dictionary<long, ICollection<long>> GetGroupedOccurrences(DataFrameColumn other, out HashSet<long> otherColumnNullIndices); 272protected Dictionary<long, ICollection<long>> GetGroupedOccurrences<TKey>(DataFrameColumn other, out HashSet<long> otherColumnNullIndices) 308public virtual DataFrameColumn FillNulls(object value, bool inPlace = false) => FillNullsImplementation(value, inPlace); 310protected abstract DataFrameColumn FillNullsImplementation(object value, bool inPlace); 313/// Returns a <see cref="DataFrameColumn"/> with no missing values. 315public virtual DataFrameColumn DropNulls() => DropNullsImplementation(); 317protected abstract DataFrameColumn DropNullsImplementation(); 345/// Appends a value to this <see cref="DataFrameColumn"/> using <paramref name="cursor"/> 365public virtual DataFrameColumn Clamp<U>(U min, U max, bool inPlace = false) => ClampImplementation(min, max, inPlace); 374protected virtual DataFrameColumn ClampImplementation<U>(U min, U max, bool inPlace) => throw new NotImplementedException(); 382public virtual DataFrameColumn Filter<U>(U min, U max) => FilterImplementation(min, max); 390protected virtual DataFrameColumn FilterImplementation<U>(U min, U max) => throw new NotImplementedException(); 424/// Returns a <see cref= "DataFrameColumn"/> with statistics that describe the column 426public virtual DataFrameColumn Description() => throw new NotImplementedException(); 429/// A preview of the contents of this <see cref="DataFrameColumn"/> as a string. 431/// <returns>A preview of the contents of this <see cref="DataFrameColumn"/>.</returns>
DataFrameColumnCollection.cs (33)
14public class DataFrameColumnCollection : Collection<DataFrameColumn> 21internal DataFrameColumnCollection(IEnumerable<DataFrameColumn> columns, Action columnsChanged) : base() 25foreach (DataFrameColumn column in columns) 43var column = this[currentName]; 48public void SetColumnName(DataFrameColumn column, string newName) 54internal void UpdateColumnNameMetadata(DataFrameColumn column, string newName) 66DataFrameColumn newColumn = new PrimitiveDataFrameColumn<T>(columnName, column); 70protected override void InsertItem(int columnIndex, DataFrameColumn column) 103protected override void SetItem(int columnIndex, DataFrameColumn column) 153/// Searches for a <see cref="DataFrameColumn"/> with the specified <paramref name="columnName"/> and returns the zero-based index of the first occurrence if found. Returns -1 otherwise 176/// An indexer based on <see cref="DataFrameColumn.Name"/> 178/// <param name="columnName">The name of a <see cref="DataFrameColumn"/></param> 179/// <returns>A <see cref="DataFrameColumn"/> if it exists.</returns> 181public DataFrameColumn this[string columnName] 195DataFrameColumn newColumn = value; 217DataFrameColumn column = this[name]; 234DataFrameColumn column = this[name]; 251DataFrameColumn column = this[name]; 268DataFrameColumn column = this[name]; 285DataFrameColumn column = this[name]; 295/// Gets the <see cref="ByteDataFrameColumn"/> with the specified <paramref name="name"/> and attempts to return it as an <see cref="ByteDataFrameColumn"/>. If <see cref="DataFrameColumn.DataType"/> is not of type <see cref="Byte"/>, an exception is thrown. 302DataFrameColumn column = this[name]; 319DataFrameColumn column = this[name]; 336DataFrameColumn column = this[name]; 353DataFrameColumn column = this[name]; 370DataFrameColumn column = this[name]; 387DataFrameColumn column = this[name]; 404DataFrameColumn column = this[name]; 421DataFrameColumn column = this[name]; 438DataFrameColumn column = this[name]; 455DataFrameColumn column = this[name]; 472DataFrameColumn column = this[name]; 489DataFrameColumn column = this[name];
DataFrameColumns\ArrowStringDataFrameColumn.cs (13)
373public new ArrowStringDataFrameColumn Clone(DataFrameColumn mapIndices, bool invertMapIndices = false, long numberOfNullsToAppend = 0) 379protected override DataFrameColumn CloneImplementation(long numberOfNullsToAppend) 393protected override DataFrameColumn CloneImplementation(DataFrameColumn mapIndices, bool invertMapIndices = false, long numberOfNullsToAppend = 0) 546protected override DataFrameColumn FillNullsImplementation(object value, bool inPlace) 564protected override DataFrameColumn DropNullsImplementation() 577public override DataFrameColumn Clamp<U>(U min, U max, bool inPlace = false) => throw new NotSupportedException(); 579public override DataFrameColumn Filter<U>(U min, U max) => throw new NotSupportedException(); 624if (value is DataFrameColumn column) 632public override PrimitiveDataFrameColumn<bool> ElementwiseEquals(DataFrameColumn column) 665if (value is DataFrameColumn column) 673public override PrimitiveDataFrameColumn<bool> ElementwiseNotEquals(DataFrameColumn column) 697public override Dictionary<long, ICollection<long>> GetGroupedOccurrences(DataFrameColumn other, out HashSet<long> otherColumnNullIndices)
DataFrameColumns\StringDataFrameColumn.cs (10)
196public override DataFrameColumn Clamp<U>(U min, U max, bool inPlace = false) => throw new NotSupportedException(); 198public override DataFrameColumn Filter<U>(U min, U max) => throw new NotSupportedException(); 278public new StringDataFrameColumn Clone(DataFrameColumn mapIndices, bool invertMapIndices, long numberOfNullsToAppend) 288protected override DataFrameColumn CloneImplementation(long numberOfNullsToAppend) 300protected override DataFrameColumn CloneImplementation(DataFrameColumn mapIndices, bool invertMapIndices = false, long numberOfNullsToAppend = 0) 393return new DataFrame(new List<DataFrameColumn> { keys, counts }); 462protected override DataFrameColumn FillNullsImplementation(object value, bool inPlace) 476protected override DataFrameColumn DropNullsImplementation() 534public override Dictionary<long, ICollection<long>> GetGroupedOccurrences(DataFrameColumn other, out HashSet<long> otherColumnNullIndices)
DataFrameColumns\VBufferDataFrameColumn.cs (7)
180public override Dictionary<long, ICollection<long>> GetGroupedOccurrences(DataFrameColumn other, out HashSet<long> otherColumnNullIndices) 270public new VBufferDataFrameColumn<T> Clone(DataFrameColumn mapIndices, bool invertMapIndices, long numberOfNullsToAppend) 280protected override DataFrameColumn CloneImplementation(DataFrameColumn mapIndices, bool invertMapIndices = false, long numberOfNullsToAppend = 0) 303protected override DataFrameColumn CloneImplementation(long numberOfNullsToAppend) 375protected override DataFrameColumn FillNullsImplementation(object value, bool inPlace) 381protected override DataFrameColumn DropNullsImplementation()
DataFrameRow.cs (1)
34foreach (DataFrameColumn column in _dataFrame.Columns)
GroupBy.cs (26)
146DataFrameColumn firstColumn = _dataFrame.Columns[_groupByColumnIndex].Clone(empty); 157DataFrameColumn column = _dataFrame.Columns[columnIndex]; 164DataFrameColumn retColumn; 189DataFrameColumn firstColumn = _dataFrame.Columns[_groupByColumnIndex].Clone(empty); 202DataFrameColumn column = _dataFrame.Columns[columnIndex]; 205DataFrameColumn retColumn; 231DataFrameColumn firstColumn = _dataFrame.Columns[_groupByColumnIndex].Clone(empty); 242DataFrameColumn column = _dataFrame.Columns[columnIndex]; 249DataFrameColumn retColumn; 285DataFrameColumn firstColumn = _dataFrame.Columns[_groupByColumnIndex].Clone(empty); 296DataFrameColumn column = _dataFrame.Columns[columnIndex]; 305DataFrameColumn retColumn; 335private DataFrameColumn ResizeAndInsertColumn(int columnIndex, long rowIndex, bool firstGroup, DataFrame ret, PrimitiveDataFrameColumn<long> empty, Func<string, DataFrameColumn> getColumn = null) 339DataFrameColumn column = _dataFrame.Columns[columnIndex]; 340DataFrameColumn retColumn; 359DataFrameColumn firstColumn = _dataFrame.Columns[_groupByColumnIndex].Clone(empty); 369DataFrameColumn retColumn = ResizeAndInsertColumn(columnIndex, rowIndex, firstGroup, ret, empty); 387DataFrameColumn firstColumn = _dataFrame.Columns[_groupByColumnIndex].Clone(empty); 397DataFrameColumn retColumn = ResizeAndInsertColumn(columnIndex, rowIndex, firstGroup, ret, empty); 415DataFrameColumn firstColumn = _dataFrame.Columns[_groupByColumnIndex].Clone(empty); 425DataFrameColumn retColumn = ResizeAndInsertColumn(columnIndex, rowIndex, firstGroup, ret, empty); 443DataFrameColumn firstColumn = _dataFrame.Columns[_groupByColumnIndex].Clone(empty); 453DataFrameColumn retColumn = ResizeAndInsertColumn(columnIndex, rowIndex, firstGroup, ret, empty); 471DataFrameColumn firstColumn = _dataFrame.Columns[_groupByColumnIndex].Clone(empty); 482DataFrameColumn retColumn = ResizeAndInsertColumn(columnIndex, rowIndex, firstGroup, ret, empty, (name) => new PrimitiveDataFrameColumn<double>(name));
IDataView.Extension.cs (3)
48List<DataFrameColumn> dataFrameColumns = new List<DataFrameColumn>(schema.Count); 151private static DataFrameColumn GetVectorDataFrame(VectorDataViewType vectorType, string name)
PrimitiveDataFrameColumn.BinaryOperations.cs (56)
18public override DataFrameColumn Add(DataFrameColumn column, bool inPlace = false) 56public override DataFrameColumn Subtract(DataFrameColumn column, bool inPlace = false) 94public override DataFrameColumn Multiply(DataFrameColumn column, bool inPlace = false) 132public override DataFrameColumn Divide(DataFrameColumn column, bool inPlace = false) 170public override DataFrameColumn Modulo(DataFrameColumn column, bool inPlace = false) 208public override DataFrameColumn And(DataFrameColumn column, bool inPlace = false) 246public override DataFrameColumn Or(DataFrameColumn column, bool inPlace = false) 284public override DataFrameColumn Xor(DataFrameColumn column, bool inPlace = false) 324public override DataFrameColumn Add<U>(U value, bool inPlace = false) 326DataFrameColumn column = value as DataFrameColumn; 335public override DataFrameColumn ReverseAdd<U>(U value, bool inPlace = false) 341public override DataFrameColumn Subtract<U>(U value, bool inPlace = false) 343DataFrameColumn column = value as DataFrameColumn; 352public override DataFrameColumn ReverseSubtract<U>(U value, bool inPlace = false) 358public override DataFrameColumn Multiply<U>(U value, bool inPlace = false) 360DataFrameColumn column = value as DataFrameColumn; 369public override DataFrameColumn ReverseMultiply<U>(U value, bool inPlace = false) 375public override DataFrameColumn Divide<U>(U value, bool inPlace = false) 377DataFrameColumn column = value as DataFrameColumn; 386public override DataFrameColumn ReverseDivide<U>(U value, bool inPlace = false) 392public override DataFrameColumn Modulo<U>(U value, bool inPlace = false) 394DataFrameColumn column = value as DataFrameColumn; 403public override DataFrameColumn ReverseModulo<U>(U value, bool inPlace = false) 427public override DataFrameColumn LeftShift(int value, bool inPlace = false) 433public override DataFrameColumn RightShift(int value, bool inPlace = false) 439public override PrimitiveDataFrameColumn<bool> ElementwiseEquals(DataFrameColumn column) 482DataFrameColumn column = value as DataFrameColumn; 491public override PrimitiveDataFrameColumn<bool> ElementwiseNotEquals(DataFrameColumn column) 534DataFrameColumn column = value as DataFrameColumn; 543public override PrimitiveDataFrameColumn<bool> ElementwiseGreaterThanOrEqual(DataFrameColumn column) 584DataFrameColumn column = value as DataFrameColumn; 593public override PrimitiveDataFrameColumn<bool> ElementwiseLessThanOrEqual(DataFrameColumn column) 634DataFrameColumn column = value as DataFrameColumn; 643public override PrimitiveDataFrameColumn<bool> ElementwiseGreaterThan(DataFrameColumn column) 684DataFrameColumn column = value as DataFrameColumn; 693public override PrimitiveDataFrameColumn<bool> ElementwiseLessThan(DataFrameColumn column) 734DataFrameColumn column = value as DataFrameColumn;
PrimitiveDataFrameColumn.Computations.cs (10)
19public override DataFrameColumn Abs(bool inPlace = false) 38public override DataFrameColumn CumulativeMax(bool inPlace = false) 45public override DataFrameColumn CumulativeMax(IEnumerable<long> rowIndices, bool inPlace = false) 52public override DataFrameColumn CumulativeMin(bool inPlace = false) 59public override DataFrameColumn CumulativeMin(IEnumerable<long> rowIndices, bool inPlace = false) 66public override DataFrameColumn CumulativeProduct(bool inPlace = false) 73public override DataFrameColumn CumulativeProduct(IEnumerable<long> rowIndices, bool inPlace = false) 80public override DataFrameColumn CumulativeSum(bool inPlace = false) 87public override DataFrameColumn CumulativeSum(IEnumerable<long> rowIndices, bool inPlace = false) 142public override DataFrameColumn Round(bool inPlace = false)
PrimitiveDataFrameColumn.cs (15)
348protected override DataFrameColumn FillNullsImplementation(object value, bool inPlace) 360protected override DataFrameColumn DropNullsImplementation() 391return new DataFrame(new List<DataFrameColumn> { keys, counts }); 417public new PrimitiveDataFrameColumn<T> Clone(DataFrameColumn mapIndices, bool invertMapIndices = false, long numberOfNullsToAppend = 0) 423protected override DataFrameColumn CloneImplementation(DataFrameColumn mapIndices, bool invertMapIndices, long numberOfNullsToAppend) 449protected override DataFrameColumn CloneImplementation(long numberOfNullsToAppend) 714protected override DataFrameColumn ClampImplementation<U>(U min, U max, bool inPlace) 744protected override DataFrameColumn FilterImplementation<U>(U min, U max) 753public override DataFrameColumn Description() 923public override Dictionary<long, ICollection<long>> GetGroupedOccurrences(DataFrameColumn other, out HashSet<long> otherColumnNullIndices) 952internal DataFrameColumn HandleOperationImplementation<U>(BinaryOperation operation, PrimitiveDataFrameColumn<U> column, bool inPlace) 1042internal DataFrameColumn HandleOperationImplementation<U>(BinaryOperation operation, U value, bool inPlace) 1120internal DataFrameColumn HandleReverseOperationImplementation<U>(BinaryOperation operation, U value, bool inPlace = false) 1215internal DataFrameColumn HandleOperationImplementation(BinaryIntOperation operation, int value, bool inPlace)
StringDataFrameColumn.BinaryOperations.cs (11)
16public override DataFrameColumn Add(DataFrameColumn column, bool inPlace = false) 71public override DataFrameColumn Add<T>(T value, bool inPlace = false) 76internal static PrimitiveDataFrameColumn<bool> ElementwiseEqualsImplementation(DataFrameColumn left, DataFrameColumn right) 92public override PrimitiveDataFrameColumn<bool> ElementwiseEquals(DataFrameColumn column) 113if (value is DataFrameColumn column) 120internal static PrimitiveDataFrameColumn<bool> ElementwiseNotEqualsImplementation(DataFrameColumn left, DataFrameColumn column) 165public override PrimitiveDataFrameColumn<bool> ElementwiseNotEquals(DataFrameColumn column) 176if (value is DataFrameColumn column)
Microsoft.Data.Analysis.Interactive.Tests (2)
DataFrameInteractiveTests.cs (2)
22DataFrameColumn dataFrameColumn1 = new Int32DataFrameColumn("Int1", Enumerable.Range(0, length).Select(x => x)); 23DataFrameColumn dataFrameColumn2 = new Int32DataFrameColumn("Int2", Enumerable.Range(10, length).Select(x => x));
Microsoft.Data.Analysis.Tests (155)
ArrowIntegrationTests.cs (1)
137DataFrame df = new DataFrame(new List<DataFrameColumn>() { ageColumn, lengthColumn, stringColumn });
ArrowStringColumnTests.cs (1)
65DataFrameColumn clone = stringColumn.Clone(numberOfNullsToAppend: 5);
DataFrame.IOTests.cs (8)
27foreach (DataFrameColumn column in df.Columns) 362foreach (var column in df.Columns) 468foreach (var column in df.Columns) 532foreach (var column in df.Columns) 553var dateTimeColumn = df.Columns["date"]; 805foreach (var column in df.Columns) 848foreach (var column in df.Columns) 910foreach (var column in df.Columns)
DataFrameGroupByTests.cs (2)
107DataFrameColumn parityColumn = new StringDataFrameColumn("Parity", Enumerable.Range(0, length).Select(x => x % 2 == 0 ? "even" : "odd")); 108DataFrameColumn tensColumn = new Int32DataFrameColumn("Tens", Enumerable.Range(0, length).Select(x => x / 10));
DataFrameIDataViewTests.cs (6)
110DataFrameColumn boolColumn = new PrimitiveDataFrameColumn<bool>("Bool", Enumerable.Range(0, (int)df.Rows.Count).Select(x => x % 2 == 1)); 116DataFrameColumn boolClone = boolColumn.Clone(); 384foreach (var column in df.Columns) 401foreach (var column in df.Columns) 419foreach (var column in df.Columns) 436foreach (var column in df.Columns)
DataFrameTests.BinaryOperations.cs (10)
94DataFrameColumn newColumn; 95DataFrameColumn verify; 110var df1Column = df1.Columns[i] + 1; 111var df2Column = df2.Columns[i] + 1; 252DataFrameColumn newCol = stringColumn.ElementwiseEquals(4); 270DataFrameColumn stringColumnCopyAsBaseColumn = stringColumnCopy; 298DataFrameColumn stringColumn = new StringDataFrameColumn("String", Enumerable.Range(0, 10).Select(x => x.ToString())); 301DataFrameColumn newCol = stringColumn.ElementwiseEquals(5); 309DataFrameColumn stringColumnCopy = new StringDataFrameColumn("String", Enumerable.Range(0, 10).Select(x => x.ToString())); 339DataFrameColumn addString = typedStringColumn + "suffix";
DataFrameTests.Computations.cs (17)
23DataFrameColumn absColumn = df.Columns["Int"].Abs(); 63DataFrameColumn doubleColumn = df.Columns["Double"].CumulativeMax(); 82DataFrameColumn floatColumn = df.Columns["Float"].CumulativeMin(); 100DataFrameColumn uintColumn = df.Columns["Uint"].CumulativeProduct(); 106DataFrameColumn ushortColumn = df.Columns["Ushort"].CumulativeSum(); 119DataFrameColumn roundColumn = df.Columns["Double"].Round(); 128DataFrameColumn column = df.Columns[i]; 185DataFrameColumn absColumn = df.Columns["Int"].Abs(); 221DataFrameColumn dateTimeColumn = df.Columns["DateTime"].CumulativeMax(); 232DataFrameColumn doubleColumn = df.Columns["Double"].CumulativeMax(); 251DataFrameColumn floatColumn = df.Columns["Float"].CumulativeMin(); 269DataFrameColumn uintColumn = df.Columns["Uint"].CumulativeProduct(); 275DataFrameColumn ushortColumn = df.Columns["Ushort"].CumulativeSum(); 288DataFrameColumn roundColumn = df.Columns["Double"].Round(); 297DataFrameColumn column = df.Columns[i]; 483var col3 = dfTest["col1"].And(dfTest["col2"]); 500var col3 = dfTest["col1"].Or(dfTest["col2"]);
DataFrameTests.cs (72)
51var dc0 = DataFrameColumn.Create("a0", new int[] { 0, 0 }); 53var dc = df.Columns["a1"]; 61DataFrameColumn intColumn = new Int32DataFrameColumn("IntColumn", Enumerable.Range(0, rowCount).Select(x => x)); 62DataFrameColumn floatColumn = new SingleDataFrameColumn("FloatColumn", Enumerable.Range(0, rowCount).Select(x => (float)x)); 75DataFrameColumn bigColumn = new SingleDataFrameColumn("BigColumn", Enumerable.Range(0, rowCount + 1).Select(x => (float)x)); 80DataFrameColumn smallColumn = new SingleDataFrameColumn("SmallColumn", Enumerable.Range(0, rowCount - 1).Select(x => (float)x)); 85DataFrameColumn repeatedName = new SingleDataFrameColumn("FloatColumn", Enumerable.Range(0, rowCount).Select(x => (float)x)); 89DataFrameColumn extraColumn = new SingleDataFrameColumn("OtherFloatColumn", Enumerable.Range(0, rowCount).Select(x => (float)x)); 94DataFrameColumn intColumnCopy = new Int32DataFrameColumn("IntColumn", Enumerable.Range(0, rowCount).Select(x => x)); 97DataFrameColumn differentIntColumn = new Int32DataFrameColumn("IntColumn1", Enumerable.Range(0, rowCount).Select(x => x)); 116DataFrameColumn intColumn = new Int32DataFrameColumn("NewIntColumn", Enumerable.Range(0, 10).Select(x => x)); 119DataFrameColumn originalLastColumn = dataFrame.Columns[columnCount - 1]; 130DataFrameColumn intColumn_1 = dataFrame.Columns["NewIntColumn"]; 134DataFrameColumn lastColumn_1 = dataFrame.Columns[originalLastColumn.Name]; 150DataFrameColumn intColumn = new Int32DataFrameColumn("NewIntColumn", Enumerable.Range(0, 10).Select(x => x)); 187var renamedColumn = dataframe["Town"]; 206var renamedColumn = dataframe["Town"]; 318DataFrameColumn originalColumn = df.Columns[c]; 319DataFrameColumn firstColumn = first.Columns[originalColumn.Name]; 330DataFrameColumn originalColumn = df.Columns[c]; 331DataFrameColumn headColumn = head.Columns[originalColumn.Name]; 337DataFrameColumn originalColumn = df.Columns[c]; 340DataFrameColumn headColumn = head.Columns[originalColumn.Name]; 353DataFrameColumn originalColumn = df.Columns[c]; 354DataFrameColumn tailColumn = tail.Columns[originalColumn.Name]; 365DataFrameColumn originalColumn = df.Columns[c]; 368DataFrameColumn maxColumn = max.Columns[originalColumn.Name]; 388DataFrameColumn originalColumn = df.Columns[c]; 391DataFrameColumn minColumn = min.Columns[originalColumn.Name]; 394DataFrameColumn productColumn = product.Columns[originalColumn.Name]; 397DataFrameColumn sumColumn = sum.Columns[originalColumn.Name]; 486DataFrameColumn baseColumn = df.Columns[i]; 562DataFrameColumn clamped = df.Columns["Int"].Clamp(3, 7); 612DataFrameColumn column = clampedColumn.Columns[c]; 727DataFrameColumn descriptionColumn = description.Columns[0]; 735DataFrameColumn column = description.Columns[i]; 745DataFrameColumn dateTimeColumn = description.Columns[description.Columns.Count - 1]; 768DataFrameColumn infoColumn = Info.Columns[0]; 775DataFrameColumn column = Info.Columns[i]; 799DataFrameColumn dataFrameColumn1 = new Int32DataFrameColumn("Int1"); 823DataFrameColumn filled = strColumn.FillNulls("foo"); 921DataFrameColumn dfColumn = df.Columns[i]; 922DataFrameColumn cloneColumn = clone.Columns[i]; 948IReadOnlyList<DataFrameColumn> columns = df.Columns; 951foreach (DataFrameColumn dataFrameColumn in columns) 999DataFrameColumn column = df.Columns[i]; 1004foreach (var column in df.Columns) 1239void AssertLengthTypeAndValues(DataFrameColumn column, Type type) 1248DataFrameColumn stringColumn = DataFrameColumn.Create("String", Enumerable.Range(0, length).Select(x => x.ToString())); 1250DataFrameColumn byteColumn = DataFrameColumn.Create("Byte", Enumerable.Range(0, length).Select(x => (byte)x)); 1252DataFrameColumn decimalColumn = DataFrameColumn.Create("Decimal", Enumerable.Range(0, length).Select(x => (decimal)x)); 1254DataFrameColumn doubleColumn = DataFrameColumn.Create("Double", Enumerable.Range(0, length).Select(x => (double)x)); 1256DataFrameColumn floatColumn = DataFrameColumn.Create("Float", Enumerable.Range(0, length).Select(x => (float)x)); 1258DataFrameColumn intColumn = DataFrameColumn.Create("Int", Enumerable.Range(0, length).Select(x => x)); 1260DataFrameColumn longColumn = DataFrameColumn.Create("Long", Enumerable.Range(0, length).Select(x => (long)x)); 1262DataFrameColumn sbyteColumn = DataFrameColumn.Create("Sbyte", Enumerable.Range(0, length).Select(x => (sbyte)x)); 1264DataFrameColumn shortColumn = DataFrameColumn.Create("Short", Enumerable.Range(0, length).Select(x => (short)x)); 1266DataFrameColumn uintColumn = DataFrameColumn.Create("Uint", Enumerable.Range(0, length).Select(x => (uint)x)); 1268DataFrameColumn ulongColumn = DataFrameColumn.Create("Ulong", Enumerable.Range(0, length).Select(x => (ulong)x)); 1270DataFrameColumn ushortColumn = DataFrameColumn.Create("Ushort", Enumerable.Range(0, length).Select(x => (ushort)x));
DataFrameTests.Filter.cs (6)
20DataFrameColumn filtered = df.Columns["Int"].Filter(3, 7); 37DataFrameColumn column = boolColumnFiltered.Columns[i]; 53DataFrameColumn intFilteredColumn = intEnumerableFiltered.Columns[i]; 54DataFrameColumn dfColumn = df.Columns[i]; 55DataFrameColumn boolFilteredColumn = boolEnumerableFiltered.Columns[i]; 56DataFrameColumn longFilteredColumn = longEnumerableFiltered.Columns[i];
DataFrameTests.Join.cs (12)
94DataFrameColumn joinColumn = join.Columns[i]; 95DataFrameColumn isEqual; 101DataFrameColumn leftColumn = left.Columns[i]; 107DataFrameColumn rightColumn = right.Columns[columnIndex]; 108DataFrameColumn compareColumn = rightColumn.Length <= join.Rows.Count ? rightColumn.Clone(numberOfNullsToAppend: join.Rows.Count - rightColumn.Length) : rightColumn.Clone(mapIndices); 116DataFrameColumn leftColumn = left.Columns[i]; 117DataFrameColumn compareColumn = leftColumn.Length <= join.Rows.Count ? leftColumn.Clone(numberOfNullsToAppend: join.Rows.Count - leftColumn.Length) : leftColumn.Clone(mapIndices); 123DataFrameColumn rightColumn = right.Columns[columnIndex]; 131DataFrameColumn leftColumn = left.Columns[i]; 137DataFrameColumn rightColumn = right.Columns[columnIndex]; 145DataFrameColumn leftColumn = left.Columns[i]; 151DataFrameColumn rightColumn = right.Columns[columnIndex];
DataFrameTests.Merge.cs (2)
22DataFrameColumn leftStringColumn = new StringDataFrameColumn("String", Enumerable.Range(0, leftCount).Select(x => "Left")); 26DataFrameColumn rightStringColumn = new StringDataFrameColumn("String", Enumerable.Range(0, rightCount).Select(x => "Right"));
DataFrameTests.Utils.cs (14)
19DataFrameColumn dataFrameColumn1 = new Int32DataFrameColumn("Int1", Enumerable.Range(0, length).Select(x => x)); 20DataFrameColumn dataFrameColumn2 = new Int32DataFrameColumn("Int2", Enumerable.Range(10, length).Select(x => x)); 96DataFrameColumn arrowStringColumn = CreateArrowStringColumn(length, withNulls); 105DataFrameColumn boolColumn = new BooleanDataFrameColumn("Bool", Enumerable.Range(0, length).Select(x => x % 2 == 0)); 117DataFrameColumn boolColumn = new BooleanDataFrameColumn("Bool", Enumerable.Range(0, length).Select(x => x % 2 == 0)); 129DataFrameColumn stringColumn = new StringDataFrameColumn("String", Enumerable.Range(0, length).Select(x => x.ToString())); 136DataFrameColumn charColumn = new CharDataFrameColumn("Char", Enumerable.Range(0, length).Select(x => (char)(x + 65))); 150DataFrameColumn dateTimeColumn = new DateTimeDataFrameColumn("DateTime", Enumerable.Range(0, length).Select(x => SampleDateTime.AddDays(x))); 175var columnsList = new List<DataFrameColumn> 207DataFrameColumn baseColumn1 = DataFrameColumn.Create("Column1", Enumerable.Range(0, length).Select(x => (T1)Convert.ChangeType(x % 2 == 0 ? 0 : 1, typeof(T1)))); 208DataFrameColumn baseColumn2 = DataFrameColumn.Create("Column2", Enumerable.Range(0, length).Select(x => (T2)Convert.ChangeType(x % 2 == 0 ? 0 : 1, typeof(T2)))); 209DataFrame dataFrame = new DataFrame(new List<DataFrameColumn> { baseColumn1, baseColumn2 });
StringDataFrameColumnTests.cs (4)
36var clonedColumn = stringColumn.Clone(new Int32DataFrameColumn("Map Indices", mapIndices)); 52var clonedColumn = stringColumn.Clone(new Int32DataFrameColumn("Map Indices", mapIndices), true); 68var clonedColumn = stringColumn.Clone(new Int64DataFrameColumn("Map Indices", mapIndices)); 84var clonedColumn = stringColumn.Clone(new Int64DataFrameColumn("Map Indices", mapIndices), true);
Microsoft.ML.Fairlearn (42)
AutoML\AutoMLExperimentExtension.cs (2)
64var sensitiveFeature = DataFrameColumn.Create("group_id", trainData.GetColumn<string>(sensitiveColumnName)); 65var label = DataFrameColumn.Create("label", trainData.GetColumn<bool>(labelColumn));
Metrics\FairlearnMetricCatalog.cs (15)
100result[_sensitiveFeatureColumn] = DataFrameColumn.Create(_sensitiveFeatureColumn, groupMetric.Keys.Select(x => x.ToString())); 101result["AUC"] = DataFrameColumn.Create("AUC", groupMetric.Keys.Select(k => groupMetric[k].AreaUnderRocCurve)); //coloumn name? 102result["Accuracy"] = DataFrameColumn.Create("Accuracy", groupMetric.Keys.Select(k => groupMetric[k].Accuracy)); 103result["PosPrec"] = DataFrameColumn.Create("PosPrec", groupMetric.Keys.Select(k => groupMetric[k].PositivePrecision)); 104result["PosRecall"] = DataFrameColumn.Create("PosRecall", groupMetric.Keys.Select(k => groupMetric[k].PositiveRecall)); 105result["NegPrec"] = DataFrameColumn.Create("NegPrec", groupMetric.Keys.Select(k => groupMetric[k].NegativePrecision)); 106result["NegRecall"] = DataFrameColumn.Create("NegRecall", groupMetric.Keys.Select(k => groupMetric[k].NegativeRecall)); 107result["F1Score"] = DataFrameColumn.Create("F1Score", groupMetric.Keys.Select(k => groupMetric[k].F1Score)); 108result["AreaUnderPrecisionRecallCurve"] = DataFrameColumn.Create("AreaUnderPrecisionRecallCurve", groupMetric.Keys.Select(k => groupMetric[k].AreaUnderPrecisionRecallCurve)); 190var data = new DataFrame(_eval.Schema.AsEnumerable().Select<DataViewSchema.Column, DataFrameColumn>(column => 234result[_sensitiveFeatureColumn] = DataFrameColumn.Create(_sensitiveFeatureColumn, groupMetric.Keys.Select(x => x.ToString())); 235result["RSquared"] = DataFrameColumn.Create("RSquared", groupMetric.Keys.Select(k => groupMetric[k].RSquared)); 236result["RMS"] = DataFrameColumn.Create("RMS", groupMetric.Keys.Select(k => groupMetric[k].RootMeanSquaredError)); 237result["MSE"] = DataFrameColumn.Create("MSE", groupMetric.Keys.Select(k => groupMetric[k].MeanSquaredError)); 238result["MAE"] = DataFrameColumn.Create("MAE", groupMetric.Keys.Select(k => groupMetric[k].MeanAbsoluteError));
Reductions\GridSearchTrialRunner.cs (9)
73df["sign"] = DataFrameColumn.Create("sign", lambdasValue.Select(x => x.sign)); 74df["group_id"] = DataFrameColumn.Create("group_id", lambdasValue.Select(x => x.e)); 75df["value"] = DataFrameColumn.Create("value", lambdasValue.Select(x => x.value)); 76_moment.LoadData(trainDataset, DataFrameColumn.Create("y", trainDataset.GetColumn<bool>(this._labelColumn)), DataFrameColumn.Create("group_id", trainDataset.GetColumn<string>(this._sensitiveColumn))); 77var signWeightColumn = _moment.SignedWeights(df); 84var column = DataFrameColumn.Create<float>("pred", predictedLabel); 86_moment.LoadData(validateDataset, DataFrameColumn.Create("y", eval.GetColumn<bool>(this._labelColumn)), DataFrameColumn.Create("group_id", validateDataset.GetColumn<string>(this._sensitiveColumn)));
Reductions\Moment.cs (6)
24protected DataFrameColumn Y; //maybe lowercase this? 31public DataFrameColumn SensitiveFeatureColumn { get => Tags["group_id"]; } 44public virtual void LoadData(IDataView features, DataFrameColumn label, StringDataFrameColumn sensitiveFeature) 56var sensitiveFeature = DataFrameColumn.Create("group_id", trainData.GetColumn<string>(sensitiveColumnName)); 57var labelColumn = DataFrameColumn.Create("label", trainData.GetColumn<bool>(label)); 72public abstract DataFrameColumn SignedWeights(DataFrame lambdaVec);
Reductions\UtilityParity.cs (10)
31public DataFrameColumn ProbGroupEvent { get; protected set; } 67public override void LoadData(IDataView x, DataFrameColumn y, StringDataFrameColumn sensitiveFeature)//, StringDataFrameColumn events = null, StringDataFrameColumn utilities = null) 98var expectGroupEvent = Tags.GroupBy("group_id").Mean("pred").OrderBy(("group_id"))["pred"]; 99var upperBoundDiff = _ratio * expectGroupEvent - expectEvent; 100var lowerBoundDiff = -1.0 /*to add a negative sign*/ * expectGroupEvent + _ratio * expectEvent; 112var groupID = Tags.GroupBy("group_id").Mean("pred").OrderBy("group_id")["group_id"]; 135public override DataFrameColumn SignedWeights(DataFrame lambdaVec) 144var lambdaGroupEvent = (_ratio * gPos["value"] - gNeg["value"]) / ProbGroupEvent; 146DataFrameColumn adjust = lambdaEvent - lambdaGroupEvent; 162DataFrameColumn signedWeights = new PrimitiveDataFrameColumn<float>("signedWeight", signedWeightsFloat);
Microsoft.ML.Fairlearn.Tests (7)
GridSearchTest.cs (7)
39df["X"] = DataFrameColumn.Create("X", new[] { 0f, 1, 2, 3, 4, 5, 6, 7, 8, 9 }); 40df["y_true"] = DataFrameColumn.Create("y_true", new[] { true, true, true, true, true, true, true, false, false, false }); 41df["y_pred"] = DataFrameColumn.Create("y_pred", new[] { true, true, true, true, false, false, false, true, false, false }); 42df["sensitiveFeature"] = DataFrameColumn.Create("sensitiveFeature", new[] { "a", "b", "a", "a", "b", "a", "b", "b", "a", "b" }); 63df["score_feature"] = DataFrameColumn.Create("score_feature", score_feature); 64df["y"] = DataFrameColumn.Create("y", new[] { 71df["sensitiveFeature"] = DataFrameColumn.Create("sensitiveFeature", new[] { "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "2", "3", "3", "3", "3", "3", "3", "3", "3", "3", "3", "3", "3", "3", "3", "3", "3", "3", "3", "3", "3", "3" });