yomise 0.1.3 → 0.1.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/to_csv.rb +12 -4
- data/lib/yomise/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28234d39ab9fcef06703c79054cde5a96f183bff244a7a217b5f2aa2c1672f0d
|
4
|
+
data.tar.gz: 216c59fb5b5e60f0e636e8891a32bc987e378073b7609231728f9375779c412a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6355f13b441d32c5f73def97805c155a343add2f343f55c0a0c40ea483e6536937529c793afdcb592b80c550a5ccf2551980f2f6462c1fa5aa54be8abc9bdfa0
|
7
|
+
data.tar.gz: '08edbe65b56af24bb6d6a06096128a04edd6fdc37e061209593096fe11e657dde41081204b2625f3e2844e0f53d1a8b765ebf4b11f94ed08ffe561d5676aad83'
|
data/lib/to_csv.rb
CHANGED
@@ -14,9 +14,17 @@ class Daru::DataFrame
|
|
14
14
|
return ans
|
15
15
|
end
|
16
16
|
|
17
|
-
def write_csv(path, encoding: nil)
|
18
|
-
|
19
|
-
|
17
|
+
def write_csv(path, encoding: nil, alt: false)
|
18
|
+
if alt
|
19
|
+
# Experimental: faster algorithm
|
20
|
+
# ""付加を先にDaru上でやってあげる案
|
21
|
+
|
22
|
+
#今はとりあえず
|
23
|
+
self.to_daru.write_csv path, encoding: encoding
|
24
|
+
else
|
25
|
+
enc = encoding.nil? ? "" : ":#{encoding}"
|
26
|
+
open(path, "w#{enc}") { _1.write to_csv }
|
27
|
+
end
|
20
28
|
end
|
21
29
|
|
22
30
|
# To avoid bug about adding column to Daru::DataFrame
|
@@ -63,7 +71,7 @@ class Daru::DataFrame
|
|
63
71
|
|
64
72
|
# index, vectors are Arrays. 'values' is String or Array.
|
65
73
|
## 文字列データなどで最初のデータだけ欲しければ agg: :first
|
66
|
-
piv = self.pivot_table index: index, vectors: vectors, agg:
|
74
|
+
piv = self.pivot_table index: index, vectors: vectors, agg: agg, values: values
|
67
75
|
piv.vectors = Daru::Index.new( piv.vectors.to_a.map { _1.join("-") } )
|
68
76
|
piv.index = Daru::Vector.new( piv.index.to_a.map { _1.join("-") } )
|
69
77
|
|
data/lib/yomise/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yomise
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.3
|
4
|
+
version: 0.1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- showata
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-09-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: daru
|