DataFrame.JoinOnNearest<R, C> Method

Returns a new data frame by joining a data frames on the nearest keys in their row indexes.

Definition

Namespace: Numerics.NET.DataAnalysis
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
C#
public static DataFrame<R, C> JoinOnNearest<R, C>(
	this DataFrame<R, C> left,
	DataFrame<R, C> right,
	Direction direction,
	Func<C, C>? thisKeyModifier = null,
	Func<C, C>? rightKeyModifier = null
)

Parameters

left  DataFrame<R, C>
The data frame that serves as the left operand of the join operation.
right  DataFrame<R, C>
The data frame that serves as the right operand of the join operation.
direction  Direction
The direction to look for the key if an exact match is not found.
thisKeyModifier  Func<C, C>  (Optional)
A function that modifies a column key of this data frame to make it unique.
rightKeyModifier  Func<C, C>  (Optional)
A function that modifies a column key of the right data frame to make it unique.

Type Parameters

R
The element type of the row index of the data frames.
C
The element type of the column index of the data frames.

Return Value

DataFrame<R, C>
The joined data frame.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type DataFrame<R, C>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Exceptions

ArgumentNullException

right is null.

See Also