public static Frame <R, C> FrameofRowsStatic <R, d, C>(IEnumerable <Tuple <R, d> > rows) where d : ISeries <C> { Tuple <FSharpList <R>, FSharpList <d> > tuple = ListModule.Unzip <R, d>((FSharpList <Tuple <M0, M1> >)ListModule.OfSeq <Tuple <R, d> >((IEnumerable <M0>)rows)); FSharpList <d> fsharpList = tuple.Item2; return(FrameUtils.fromRows <R, C, d>(FIndexBuilderimplementation.IndexBuilder.Instance, FVectorBuilderimplementation.VectorBuilder.Instance, new Series <R, d>((IEnumerable <R>)tuple.Item1, (IEnumerable <d>)fsharpList))); }
public static Frame <long, K> FrameofRowsOrdinalStatic <e, K, V>(IEnumerable <e> rows) where e : Series <K, V> { IVector <e> vector = FVectorBuilderimplementation.VectorBuilder.Instance.Create <e>(ArrayModule.OfSeq <e>(rows)); return(FrameUtils.fromRows <long, K, e>(FIndexBuilderimplementation.IndexBuilder.Instance, FVectorBuilderimplementation.VectorBuilder.Instance, new Series <long, e>(FIndexBuilderimplementation.IndexBuilder.Instance.Create <long>((IEnumerable <long>)Operators.CreateSequence <long>((IEnumerable <M0>)Operators.OperatorIntrinsics.RangeInt64(0L, 1L, vector.Length - 1L)), FSharpOption <bool> .Some(true)), vector, FVectorBuilderimplementation.VectorBuilder.Instance, FIndexBuilderimplementation.IndexBuilder.Instance))); }
public static Frame <R, C> FrameofRowsStatic <R, c, C>(Series <R, c> rows) where c : ISeries <C> { return(FrameUtils.fromRows <R, C, c>(FIndexBuilderimplementation.IndexBuilder.Instance, FVectorBuilderimplementation.VectorBuilder.Instance, rows)); }
public static Frame <TRowKey, TColumnKey> GetRows <TRowKey, TColumnKey>(this Frame <TRowKey, TColumnKey> frame, params TRowKey[] rowKeys) { Series <TRowKey, ObjectSeries <TColumnKey> > items = frame.Rows.GetItems((IEnumerable <TRowKey>)rowKeys); return(FrameUtils.fromRows <TRowKey, TColumnKey, ObjectSeries <TColumnKey> >(frame.IndexBuilder, frame.VectorBuilder, items)); }
public static Frame <TColumnKey, TRowKey> Transpose <TRowKey, TColumnKey>(this Frame <TRowKey, TColumnKey> frame) { ColumnSeries <TRowKey, TColumnKey> columns = frame.Columns; return(FrameUtils.fromRows <TColumnKey, TRowKey, ObjectSeries <TRowKey> >(frame.IndexBuilder, frame.VectorBuilder, (Series <TColumnKey, ObjectSeries <TRowKey> >)columns)); }
public static Frame <a, TColumnKey> SelectRowKeys <TRowKey, TColumnKey, a>(this Frame <TRowKey, TColumnKey> frame, Func <KeyValuePair <TRowKey, OptionalValue <ObjectSeries <TColumnKey> > >, a> projection) { Series <a, ObjectSeries <TColumnKey> > nested = frame.Rows.SelectKeys <a>(projection); return(FrameUtils.fromRows <a, TColumnKey, ObjectSeries <TColumnKey> >(frame.IndexBuilder, frame.VectorBuilder, nested)); }
public static Frame <TRowKey, b> Select <TRowKey, TColumnKey, a, b>(this Frame <TRowKey, TColumnKey> frame, Func <KeyValuePair <TRowKey, ObjectSeries <TColumnKey> >, int, a> projection) where a : ISeries <b> { Series <TRowKey, a> nested = frame.Rows.Select <a>(projection); return(FrameUtils.fromRows <TRowKey, b, a>(frame.IndexBuilder, frame.VectorBuilder, nested)); }
public static Frame <TColKey, TRowKey> FromRows <TColKey, TRowKey, V>(Series <TColKey, Series <TRowKey, V> > rows) { return(FrameUtils.fromRows <TColKey, TRowKey, Series <TRowKey, V> >(FIndexBuilderimplementation.IndexBuilder.Instance, FVectorBuilderimplementation.VectorBuilder.Instance, rows)); }
public static Frame <RowKey, ColKey> FromRows <RowKey, ColKey>(IEnumerable <KeyValuePair <RowKey, ObjectSeries <ColKey> > > rows) { return(FrameUtils.fromRows <RowKey, ColKey, ObjectSeries <ColKey> >(FIndexBuilderimplementation.IndexBuilder.Instance, FVectorBuilderimplementation.VectorBuilder.Instance, new Series <RowKey, ObjectSeries <ColKey> >((IEnumerable <RowKey>)SeqModule.Map <KeyValuePair <RowKey, ObjectSeries <ColKey> >, RowKey>((FSharpFunc <M0, M1>) new FrameExtensions.rowKeys <RowKey, ColKey>(), (IEnumerable <M0>)rows), (IEnumerable <ObjectSeries <ColKey> >)SeqModule.Map <KeyValuePair <RowKey, ObjectSeries <ColKey> >, ObjectSeries <ColKey> >((FSharpFunc <M0, M1>) new FrameExtensions.rowSeries <RowKey, ColKey>(), (IEnumerable <M0>)rows)))); }
public static Frame <int, ColKey> FromRows <ColKey, V>(IEnumerable <Series <ColKey, V> > rows) { return(FrameUtils.fromRows <int, ColKey, Series <ColKey, V> >(FIndexBuilderimplementation.IndexBuilder.Instance, FVectorBuilderimplementation.VectorBuilder.Instance, new Series <int, Series <ColKey, V> >((IEnumerable <int>)SeqModule.MapIndexed <Series <ColKey, V>, int>((FSharpFunc <int, FSharpFunc <M0, M1> >) new FrameExtensions.FromRows <ColKey, V>(), (IEnumerable <M0>)rows), rows))); }