Exemplo n.º 1
0
 /// <summary>
 /// Returns a sample.
 /// </summary>
 public IDataFrameView Sample(int nrows = 5, bool distinct = false, IRandom rand = null)
 {
     nrows = Math.Min(Length, nrows);
     return(new DataFrameView(this, DataFrameRandom.RandomIntegers(nrows, Length, distinct, rand), null));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Returns a sample.
 /// </summary>
 public IDataFrameView Sample(int nrows = 5, bool distinct = false, IRandom rand = null)
 {
     nrows = Math.Min(Length, nrows);
     return(new DataFrameView(_src, DataFrameRandom.RandomIntegers(nrows, Length, distinct, rand).Select(c => _rows[c]).ToArray(), _columns));
 }