![Page 1: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/1.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
RubyもApache Arrowでデータ処理言語の
仲間入り
須藤功平クリアコード
DataScience.rbワークショップ2017-05-19
![Page 2: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/2.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
はじめに
私はRubyが好きだだからデータ分析だって
RubyでやりたいRubyよりも向いている言語があるのはわかっているけどさー
![Page 3: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/3.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
Apache Arrow
データフォーマットの仕様
と
その仕様を処理する実装
![Page 4: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/4.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
Arrow:解決したい問題
高いデータ交換コスト→低くしたい✓
✓
重複した最適化実装→実装を共有したい✓
✓
![Page 5: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/5.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
Arrow:文脈
ビッグデータの分析
![Page 6: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/6.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
ビッグデータの分析
いろんなシステムが連携
Java実装のもろもろとPythonとR✓
✓
システム間でデータ交換が必要交換する度にシリアライズ・パース✓
↑に結構CPUと時間を使われる…✓
そんなのより分析処理に使いたい!✓
✓
![Page 7: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/7.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
Arrow:解決方針
コストゼロのシリアライズ・
パース
![Page 8: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/8.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
Arrow:コストゼロの実現
そのまま使えるフォーマット
例:int8の配列→int8の値を連続配置✓
1バイトずつずらせば高速アクセス可✓
✓
Arrowのトレードオフサイズ圧縮よりシリアライズゼロ✓
参考:Parquetはサイズ圧縮優先✓
✓
![Page 9: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/9.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
Arrowがある世界
各システムがサクサク連携
例:PySparkが高速化✓
理由:Py🡘Javaのデータ交換コスト減✓
✓
Java・Python・R以外も活躍例:Ruby・Lua・Julia・Go・Rust…✓
理由:低コストでデータ交換可能✓
✓
![Page 10: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/10.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
ArrowとRuby
チャンス!
![Page 11: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/11.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
ArrowとRubyとデータ分析
RubyがArrowに対応Rubyにデータが回ってくる!✓
→Rubyにもデータ分析の機会が!(今はできることは少ないだろうけど…)
✓
✓
次のステップできることを増やしていく!✓
→Rubyでもいろいろデータ分析!✓
✓
![Page 12: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/12.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
ArrowとRubyの今
RubyでArrowを使える!私が使えるようにしているから!コミッターにもなった
✓
公式リポジトリーにも入っている厳密に言うと違うんだけど公式サポートだと思ってよい
✓
✓
Rubyでデータを読み書きできるいくらかデータ処理もできる✓
✓
![Page 13: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/13.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
今できること
Python・R…とのデータ交換✓
データ処理をいくらか✓
Rubyの各種ライブラリー間でのデータ交換
✓
![Page 14: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/14.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
Arrow:Python
# pandasでデータ生成→Arrow形式で書き込みimport pandas as pdimport pyarrow as pa
df = pd.DataFrame({"a": [1, 2, 3], "b": ["hello", "world", "!"]})record_batch = pa.RecordBatch.from_pandas(df)
with pa.OSFile("/dev/shm/pandas.arrow", "wb") as sink: schema = record_batch.schema writer = pa.RecordBatchFileWriter(sink, schema) writer.write_batch(record_batch) writer.close()
![Page 15: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/15.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
Arrow:Ruby
# RubyでArrow形式のpandasのデータを読み込みrequire "arrow"
Input = Arrow::MemoryMappedInputStreamInput.open("/dev/shm/pandas.arrow") do |input| reader = Arrow::RecordBatchFileReader.new(input) reader.each do |record_batch| puts("=" * 40) puts(record_batch) endend
![Page 16: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/16.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
Arrow:Lua
-- LuaでArrow形式のpandasのデータを読み込み-- Torchへの変換コードはArrowの公式リポジトリーにアリlocal lgi = require "lgi"local Arrow = lgi.Arrow
local input_class = Arrow.MemoryMappedInputStreamlocal input = input_class.new("/dev/shm/pandas.arrow")local reader = Arrow.RecordBatchFileReader.new(input)for i = 0, reader:get_n_record_batches() - 1 do local record_batch = reader:get_record_batch(i) print(string.rep("=", 40)) print("record-batch["..i.."]:") io.write(record_batch:to_string())endinput:close()
![Page 17: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/17.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
Feather:R
# Rでデータ生成→Feather形式で書き込みlibrary("feather")
df = data.frame(a=c(1, 2, 3), b=c(1.1, 2.2, 3.3))write_feather(df, "/dev/shm/dataframe.feather")
![Page 18: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/18.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
Feather:Ruby
# RubyでFeather形式のRのデータを読み込みrequire "arrow"
Input = Arrow::MemoryMappedInputStreamInput.open("/dev/shm/dataframe.feather") do |input| reader = Arrow::FeatherFileReader.new(input) reader.columns.each do |column| puts("#{column.name}: #{column.to_a.inspect}") endend
![Page 19: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/19.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
Parquet:Python
# Pythonでデータ生成→Parquet形式で書き込みimport pandas as pdimport pyarrow as paimport pyarrow.parquet as pq
df = pd.DataFrame({"a": [1, 2, 3], "b": ["hello", "world", "!"]})table = pa.Table.from_pandas(df)pq.write_table(table, "/dev/shm/pandas.parquet")
![Page 20: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/20.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
Parquet:Ruby
# RubyでParquet形式のデータを読み込みrequire "arrow"require "parquet"
path = "/dev/shm/pandas.parquet"reader = Parquet::ArrowFileReader.new(path)table = reader.read_tabletable.each_column do |column| puts("#{column.name}: #{column.to_a.inspect}")end
![Page 21: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/21.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
対応データ形式まとめ
Arrow形式各種言語(これから広く使われるはず)✓
✓
Feather形式Python・R専用✓
✓
Parquet形式各種言語(Hadoop界隈ですでに広く使われている)✓
✓
![Page 22: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/22.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
データ処理例
Groongaでフィルター✓
Groonga全文検索エンジン✓
カラムストアなので集計処理も得意✓
Apache Arrow対応✓
よくできたRubyバインディングあり✓
✓
![Page 23: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/23.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
Groonga:Ruby
# 空のテーブルにArrow形式のデータを読み込むlogs = Groonga::Array.create(name: "logs")logs.load_arrow("/dev/shm/pandas.arrow")logs.each {|record| p record.attributes}# フィルターfiltered_logs = logs.select do |record| record.b =~ "hello" # "hello"で全文検索end# フィルター結果をArrow形式で書き込みfiltered_logs.dump_arrow("/dev/shm/filtered.arrow", column_names: ["a", "b"])
![Page 24: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/24.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
Groonga:Python
# Arrow形式のGroongaでのフィルター結果を読み込むimport pyarrow as pa
with pa.OSFile("/dev/shm/filtered.arrow") as source: writer = pa.RecordBatchFileReader(source) print(writer.get_record_batch(0).to_pandas())
![Page 25: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/25.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
Rubyでデータ処理(現状)
既存のCライブラリーを活用速度がでるし機能もある✓
✓
CライブラリーをArrowに対応Arrow→Ruby→Cライブラリー↑から↓で高速化(オブジェクト生成は遅い)
✓
Arrow→Cライブラリー✓
✓
![Page 26: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/26.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
Rubyでデータ処理(案)
Fluentdとか速くなりそう途中でメッセージを参照しないなら✓
✓
MessagePackからArrowに変えるArrowのまま出力先へ送る✓
途中でRubyオブジェクトを作らないシリアライズ・パースがなくなって速い!
✓
✓
![Page 27: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/27.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
多次元配列
Arrowではオプション機能テンソルと呼んでいる(traditional multidimensional array objectと説明)
✓
✓
C++実装ではサポートバインディングでは使える✓
Python・Ruby・Lua…では使える✓
✓
![Page 28: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/28.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
Tensor:Python
# NumPyでデータ生成→書き込みimport pyarrow as paimport numpy as np
ndarray = np.random.randn(10, 6) # 10x6print(ndarray)tensor = pa.Tensor.from_numpy(ndarray)with pa.OSFile("/dev/shm/tensor.arrow", "wb") as sink: pa.write_tensor(tensor, sink)
![Page 29: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/29.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
Tensor:Ruby
# Rubyで読み込みrequire "arrow"
Input = Arrow::MemoryMappedInputStreamInput.open("/dev/shm/tensor.arrow") do |input| tensor = input.read_tensor(0) p tensor.shape # => [10, 6]end
![Page 30: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/30.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
Ruby:GSL
# GSLオブジェクトに変換require "arrow"require "arrow-gsl"require "pp"
Input = Arrow::MemoryMappedInputStreamInput.open("/dev/shm/tensor.arrow") do |input| tensor = input.read_tensor(0) pp tensor.to_gsl # tensor.to_gsl.to_arrow == tensorend
![Page 31: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/31.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
Ruby:NMatrix
# NMatrixオブジェクトに変換require "arrow"require "arrow-nmatrix"require "pp"
Input = Arrow::MemoryMappedInputStreamInput.open("/dev/shm/tensor.arrow") do |input| tensor = input.read_tensor(0) pp tensor.to_nmatrix # tensor.to_nmatrix.to_arrow == tensorend
![Page 32: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/32.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
Ruby:Numo::NArray
# Numo::NArrayオブジェクトに変換require "arrow"require "arrow-numo-narray"require "pp"
Input = Arrow::MemoryMappedInputStreamInput.open("/dev/shm/tensor.arrow") do |input| tensor = input.read_tensor(0) pp tensor.to_narray # tensor.to_narray.to_arrow == tensorend
![Page 33: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/33.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
ここまでのまとめ1
Arrowが実現したい世界データ交換コストが低い世界✓
最適化実装を共有している世界✓
✓
![Page 34: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/34.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
ここまでのまとめ2
RubyとArrowの今ArrowはRubyを公式サポート!✓
Rubyの外の世界とデータ交換可能(Arrow・Feather・Parquetをサポート)
✓
Rubyの各種ライブラリーとの相互変換が可能(メモリーコピーぐらいのコストで)
✓
✓
![Page 35: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/35.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
ArrowとRubyとこれから
Arrowデータフレーム処理の最適化実装✓
マルチコア・GPU対応✓
✓
RubyRed Data Toolsプロジェクト✓
✓
![Page 36: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/36.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
Red Data Tools
Rubyでデータ処理したいなぁ!の実現を目指すプロジェクト
✓
リソース:
GitHub: red-data-tools✓
https://red-data-tools.github.io✓
https://gitter.im/red-data-tools✓
✓
![Page 37: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/37.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
既存プロダクト
Red Arrow(ArrowのRubyバインディング)
Red Arrow XXX(ArrowとXXXの相互変換)✓
✓
Parquet GLib(ParquetのGLibバインディング)✓
Red Parquet(ParquetのRubyバインディング)✓
Jekyll Jupyter Notebook plugin(JekyllでJupyter Notebookを表示)
✓
![Page 38: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/38.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
ポリシー1
Collaborateover Ruby communitiesRuby以外の人たちとも言語を超えて協力するApache Arrowがやっていることはまさにそう
もちろんRubyの人たちとも協力する
![Page 39: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/39.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
ポリシー2
Acting than blaming時間は嘆き・非難より手を動かすことに使う
![Page 40: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/40.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
ポリシー3
Continuous small works thana temporary big work一時的にガッとやって終わりより小さくても継続して活動する
![Page 41: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/41.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
ポリシー4
The currentlack of knowledge
isn't matter現時点で数学や統計学などの知識が足りなくても問題ない既存の実装を使ったりそこから学んだりできるから
![Page 42: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/42.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
ポリシー5
Ignore blames from outsiders部外者の非難は気にしない
結果がでるまでグチグチ言われるはず :p
![Page 43: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/43.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
ポリシー6
Fun!Because we use Ruby!
Rubyを使うんだし楽しくやろう!
![Page 44: RubyもApache Arrowで データ処理言語の 仲間入り · RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1 Apache Arrow データフォーマットの仕様](https://reader030.vdocuments.net/reader030/viewer/2022040702/5d67128088c993d50c8b8f24/html5/thumbnails/44.jpg)
RubyもApache Arrowでデータ処理言語の仲間入り Powered by Rabbit 2.2.1
Join us!
Rubyでデータ処理したい人!✓
ポリシーに同意できる人!✓
リソース:
GitHub: red-data-tools✓
https://red-data-tools.github.io✓
https://gitter.im/red-data-tools✓
✓