public DataFrame TJoin <T1, T2, T3>(IDataFrameView right, IEnumerable <int> colsLeft, IEnumerable <int> colsRight, string leftSuffix = null, string rightSuffix = null, JoinStrategy joinType = JoinStrategy.Inner, bool sort = true) where T1 : IEquatable <T1>, IComparable <T1> where T2 : IEquatable <T2>, IComparable <T2> where T3 : IEquatable <T3>, IComparable <T3> { int[] orderLeft = _rows.Select(c => c).ToArray(); int[] orderRight = (right as DataFrame) is null ? (right as DataFrameView)._rows.Select(c => c).ToArray() : null; int[] columnsRight = (right as DataFrame) is null ? (right as DataFrameView)._columns : null; var icolsLeft = colsLeft.ToArray(); var icolsRight = colsRight.ToArray(); var scolsLeft = icolsLeft.Select(c => Schema.GetColumnName(c)).ToArray(); var scolsRight = icolsRight.Select(c => right.Schema.GetColumnName(c)).ToArray(); return(DataFrameJoining.TJoin(this, right, orderLeft, orderRight, _columns, columnsRight, icolsLeft, icolsRight, sort, leftSuffix, rightSuffix, joinType, GetMultiGetterAt <T1, T2, T3>(icolsLeft), right.GetMultiGetterAt <T1, T2, T3>(icolsRight), ke => ke.ToImTuple(), ke => DataFrameGroupKey.Create(scolsLeft, ke), ke => DataFrameGroupKey.Create(scolsRight, ke))); }
public DataFrame Join(IDataFrameView right, IEnumerable <int> colsLeft, IEnumerable <int> colsRight, string leftSuffix = null, string rightSuffix = null, JoinStrategy joinType = JoinStrategy.Inner, bool sort = true) { return(DataFrameJoining.Join(this, right, colsLeft, colsRight, leftSuffix, rightSuffix, joinType, sort)); }