-
Notifications
You must be signed in to change notification settings - Fork 140
Open
Description
The join method is frequently used in data frame operations.
Joining two data frames is easy in Daru. But the order of the vectors is a bit strange.
Ruby Daru
require 'daru'
people = Daru::DataFrame.new(ID: [20, 40], Name: ["John Doe", "Jane Doe"])
jobs = Daru::DataFrame.new(ID: [20, 40], Job: ["Lawyer", "Doctor"])
Daru::Core::Merge.join(people, jobs, on: [:ID], how: :inner)
# people.join(jobs, how: :inner, on: [:ID])The vector of Name and the vector of Job are separated to the left and right of the ID.
Julia DataFrame.jl
https://juliadata.github.io/DataFrames.jl/stable/man/joins.html
using DataFrames
people = DataFrame(ID = [20, 40], Name = ["John Doe", "Jane Doe"])
jobs = DataFrame(ID = [20, 40], Job = ["Lawyer", "Doctor"])
join(people, jobs, on = :ID)I think Julia's way is more practical.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

