Matrix module for DataFrame, providing basic mathematical matrix computations.
df
DataFrame An instance of DataFrame.
Check if two DataFrames are commutative, if both have the same dimensions.
df
DataFrame The second DataFrame to check.reverse
Boolean Revert the second DataFrame before the comparison. (optional, defaultfalse
)
df.matrix.isCommutative(df2)
Returns Boolean True if they are commutative, else false.
Provide an elements pairwise addition of two DataFrames having the same dimensions.
df
DataFrame The second DataFrame to add.
df.matrix.add(df2)
Returns DataFrame A new DataFrame resulting to the addition two DataFrames.
Provide a scalar product between a number and a DataFrame.
number
Number The number to multiply.
df.matrix.product(6)
Returns DataFrame A new DataFrame resulting to the scalar product.
Multiply one DataFrame n x p and a second p x n.
df
DataFrame The second DataFrame to multiply.
df.matrix.dot(df)
Returns DataFrame A new n x n DataFrame resulting to the product of two DataFrame.