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
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.8k
Exploring anti-patterns in Rails
aemeredith
3
430
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
330
Into the Great Unknown - MozCon
thekraken
41
2.6k
Unsuck your backbone
ammeep
672
58k
Information Architects: The Missing Link in Design Systems
soysaucechin
0
990
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
790
Git: the NoSQL Database
bkeepers
PRO
432
67k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.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