Closed mqzhang closed 10 years ago
Add a join function for Dataset:
a = {'a' => [1,2].to_vector, 'b' => [2,3].to_vector}.to_dataset b = {'c' => [1,2].to_vector, 'd' => [5,6].to_vector}.to_dataset c = {'a' => [1,2].to_vector, 'b' => [2,3].to_vector, 'd' => [5,6].to_vector}.to_dataset p c == a.join(b,['a'],['c']) # => true
Thanks! If you can add the test, should be great.
@clbustos Thanks to accept it. Sorry I don't know how to add the test. I used an external script with a monkey patch to test the function.
Add a join function for Dataset: