Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
研鑽Rubyプログラミング読書会
Search
Hirokazu SUZUKI
November 17, 2023
86
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
研鑽Rubyプログラミング読書会
研鑽Rubyプログラミング7章の関連資料です。
Hirokazu SUZUKI
November 17, 2023
More Decks by Hirokazu SUZUKI
See All by Hirokazu SUZUKI
冒険の続き ~ RedAmber ~ A DataFrame Library in Ruby
heronshoes
0
710
すごい広島.rb with Python[74] Hirokazu SUZUKI
heronshoes
0
110
The Adventure of RedAmber - A data frame library in Ruby
heronshoes
0
3.7k
Featured
See All Featured
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1.1k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
330
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
190
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
370
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
350
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
560
How GitHub (no longer) Works
holman
316
150k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.1k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
430
Believing is Seeing
oripsolob
1
170
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
330
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.1k
Transcript
7.3 7.3.1 - メソッドの数が多い - 単純 - 柔軟性は低い 7.3.2 -
メソッドの数が少ない - 複雑 - 柔軟性は高い a.inner_join(b, key) a.full_join(b, key) a.left_join(b, key) etc. 実装は、#joinを呼んでいる 拙作 RedAmberでは、こんな例がある データフレーム同士を結合するメソッド群で、両方とも使っている(他言語の流儀に合わせるため) a.join(b, key, type: :inner_join) :typeは、:inner, :fullなど結合のタイプを指定する ソース: https://github.com/red-data-tools/red_amber/blob/main/lib/red_amber/data_frame_combinable.rb #joinの実装は、Red ArrowのTable#joinを呼びながら データフレーム独自の仕様に基づいて色々やっている
https://gist.github.com/heronshoes/d301bfd58adfbf51e28584bf2e68c190
RedAmber Features RedAmber (Ruby) Tidyverse (R) pandas (Python) DataFrames.jl (Julia)
一致した行だけを連結 (内部結合) inner_join, join dplyr::inner_join merge innerjoin 全ての行を連結 (外部結合) full_join, outer_join, join dplyr::full_join merge outerjoin 左の一致した値を残して連結 (左外部結合) left_join, join dplyr::left_join merge leftjoin 右の一致した値を残して連結 (右外部結合) right_join, join dplyr::right_join merge rightjoin 左の行のうち、右と一致したものを残す semi_join, join dplyr::semi_join [isin] semijoin 左の行のうち、右と一致しなかったもの を残す anti_join, join dplyr::anti_join [isin] antijoin 左右どちらかにある行を残す(和) union dplyr::union merge 左右両方にある行を残す(積) intersect dplyr::intersect merge 左にはあるが右にない行を残す(差) difference, setdiff dplyr::setdiff merge https://github.com/red-data-tools/red_amber/blob/main/doc/DataFrame_Comparison_ja.md