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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
700
すごい広島.rb with Python[74] Hirokazu SUZUKI
heronshoes
0
110
The Adventure of RedAmber - A data frame library in Ruby
heronshoes
0
3.6k
Featured
See All Featured
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.7k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.3k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
150
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
340
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
A Soul's Torment
seathinner
6
3k
Believing is Seeing
oripsolob
1
150
Discover your Explorer Soul
emna__ayadi
2
1.1k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
290
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
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