red-datasets-arrow 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/doc/text/news.md +6 -0
- data/lib/datasets-arrow/arrowable.rb +2 -0
- data/lib/datasets-arrow/version.rb +1 -1
- data/test/test-iris.rb +116 -6
- metadata +5 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d1959eefda9562bfd7270e9d2ec552e4579de6f3f53649313517f29d11f7bdf
|
4
|
+
data.tar.gz: 9c0f5dc06f874726f4946e6b7c3358a1becbdc36470168344e94b80950a0d6d2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0b3e741be4d17e593f0ea976b79a08c184c645e8d5421478f98aba9b0d8b1703fddb070e96763081781d51ae38e5e9ae85c81135d4536fd81219ae55a68df34
|
7
|
+
data.tar.gz: f35d9c2c768dccfc19a2c71245d86b0cd981acc0c9a214a158c61630e91fe7ee33721731430fe648189c3f166880f8bb6f33d32729a25cf961cbe82c3fafa183
|
data/doc/text/news.md
CHANGED
data/test/test-iris.rb
CHANGED
@@ -5,7 +5,7 @@ class IrisTest < Test::Unit::TestCase
|
|
5
5
|
|
6
6
|
test("#to_arrow") do
|
7
7
|
assert_equal(<<-TABLE, @dataset.to_arrow.to_s)
|
8
|
-
sepal_length sepal_width petal_length petal_width
|
8
|
+
sepal_length sepal_width petal_length petal_width label
|
9
9
|
0 5.100000 3.500000 1.400000 0.200000 Iris-setosa
|
10
10
|
1 4.900000 3.000000 1.400000 0.200000 Iris-setosa
|
11
11
|
2 4.700000 3.200000 1.300000 0.200000 Iris-setosa
|
@@ -32,11 +32,121 @@ class IrisTest < Test::Unit::TestCase
|
|
32
32
|
|
33
33
|
test("#each_record_batch") do
|
34
34
|
assert_equal([<<-RECORD_BATCH], @dataset.each_record_batch.collect(&:to_s))
|
35
|
-
sepal_length:
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
35
|
+
sepal_length: [
|
36
|
+
5.1,
|
37
|
+
4.9,
|
38
|
+
4.7,
|
39
|
+
4.6,
|
40
|
+
5,
|
41
|
+
5.4,
|
42
|
+
4.6,
|
43
|
+
5,
|
44
|
+
4.4,
|
45
|
+
4.9,
|
46
|
+
...
|
47
|
+
6.7,
|
48
|
+
6.9,
|
49
|
+
5.8,
|
50
|
+
6.8,
|
51
|
+
6.7,
|
52
|
+
6.7,
|
53
|
+
6.3,
|
54
|
+
6.5,
|
55
|
+
6.2,
|
56
|
+
5.9
|
57
|
+
]
|
58
|
+
sepal_width: [
|
59
|
+
3.5,
|
60
|
+
3,
|
61
|
+
3.2,
|
62
|
+
3.1,
|
63
|
+
3.6,
|
64
|
+
3.9,
|
65
|
+
3.4,
|
66
|
+
3.4,
|
67
|
+
2.9,
|
68
|
+
3.1,
|
69
|
+
...
|
70
|
+
3.1,
|
71
|
+
3.1,
|
72
|
+
2.7,
|
73
|
+
3.2,
|
74
|
+
3.3,
|
75
|
+
3,
|
76
|
+
2.5,
|
77
|
+
3,
|
78
|
+
3.4,
|
79
|
+
3
|
80
|
+
]
|
81
|
+
petal_length: [
|
82
|
+
1.4,
|
83
|
+
1.4,
|
84
|
+
1.3,
|
85
|
+
1.5,
|
86
|
+
1.4,
|
87
|
+
1.7,
|
88
|
+
1.4,
|
89
|
+
1.5,
|
90
|
+
1.4,
|
91
|
+
1.5,
|
92
|
+
...
|
93
|
+
5.6,
|
94
|
+
5.1,
|
95
|
+
5.1,
|
96
|
+
5.9,
|
97
|
+
5.7,
|
98
|
+
5.2,
|
99
|
+
5,
|
100
|
+
5.2,
|
101
|
+
5.4,
|
102
|
+
5.1
|
103
|
+
]
|
104
|
+
petal_width: [
|
105
|
+
0.2,
|
106
|
+
0.2,
|
107
|
+
0.2,
|
108
|
+
0.2,
|
109
|
+
0.2,
|
110
|
+
0.4,
|
111
|
+
0.3,
|
112
|
+
0.2,
|
113
|
+
0.2,
|
114
|
+
0.1,
|
115
|
+
...
|
116
|
+
2.4,
|
117
|
+
2.3,
|
118
|
+
1.9,
|
119
|
+
2.3,
|
120
|
+
2.5,
|
121
|
+
2.3,
|
122
|
+
1.9,
|
123
|
+
2,
|
124
|
+
2.3,
|
125
|
+
1.8
|
126
|
+
]
|
127
|
+
label: [
|
128
|
+
"Iris-setosa",
|
129
|
+
"Iris-setosa",
|
130
|
+
"Iris-setosa",
|
131
|
+
"Iris-setosa",
|
132
|
+
"Iris-setosa",
|
133
|
+
"Iris-setosa",
|
134
|
+
"Iris-setosa",
|
135
|
+
"Iris-setosa",
|
136
|
+
"Iris-setosa",
|
137
|
+
"Iris-setosa",
|
138
|
+
...
|
139
|
+
"Iris-virginica",
|
140
|
+
"Iris-virginica",
|
141
|
+
"Iris-virginica",
|
142
|
+
"Iris-virginica",
|
143
|
+
"Iris-virginica",
|
144
|
+
"Iris-virginica",
|
145
|
+
"Iris-virginica",
|
146
|
+
"Iris-virginica",
|
147
|
+
"Iris-virginica",
|
148
|
+
"Iris-virginica"
|
149
|
+
]
|
40
150
|
RECORD_BATCH
|
41
151
|
end
|
42
152
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: red-datasets-arrow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kouhei Sutou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: red-arrow
|
@@ -112,7 +112,7 @@ description: 'Red Datasets Arrow adds `#to_arrow` method to each dataset in Red
|
|
112
112
|
You can get dataset as `Arrow::Table` object. `Arrow::Table` is provided by [Red
|
113
113
|
Arrow](http://github.com/red-data-tools/red-arrow).
|
114
114
|
|
115
|
-
'
|
115
|
+
'
|
116
116
|
email:
|
117
117
|
- kou@clear-code.com
|
118
118
|
executables: []
|
@@ -151,13 +151,12 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
153
|
requirements: []
|
154
|
-
|
155
|
-
rubygems_version: 2.7.6
|
154
|
+
rubygems_version: 3.3.0.dev
|
156
155
|
signing_key:
|
157
156
|
specification_version: 4
|
158
157
|
summary: Red Datasets Arrow adds [Apache Arrow](http://arrow.apache.org/) object export
|
159
158
|
feature to Red Datasets.
|
160
159
|
test_files:
|
161
|
-
- test/test-iris.rb
|
162
160
|
- test/helper.rb
|
163
161
|
- test/run-test.rb
|
162
|
+
- test/test-iris.rb
|