pandas 0.3.7 → 0.3.8

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cb4920b69400b783baa3a1b7d3de0bba0de307a3501ed4eea268c3b29c87724c
4
- data.tar.gz: 33651feb566d77b5c214df533d726a9b451cc8e6b09b30f8fe9ab46728ac0742
3
+ metadata.gz: 2c1913012c2ccb555b4ed0b8a9ff2b7b1da0976c3a6ed163a08039d0304c9d19
4
+ data.tar.gz: f86be3583b9ffaebf0b3d3253a36d57682c878499df3030313416c642d28061e
5
5
  SHA512:
6
- metadata.gz: abfca8a9bfe9644d92f99a180c0377bc10b4da2e878ec0dcd07b3bef0791144fe6e4f03b736909b485f382415172e436a5d921fbe86c8f9fa0834f1644480fef
7
- data.tar.gz: af9989bfd4fe2f6d589f65c0f93fce3bfb84dae25cbf2a9597a0e5383dd7363d4f2a3415bc3355d06ef4403d7e1de1705705c153d736ca9394c40ba552a1db0a
6
+ metadata.gz: b8ae3f74cdb2174ca85011a3449864dbc36aa2de9dae0e8910ca9c68fd53dbfef58d0c443e4dd243d1ec4ec50c408eaa4deac75a20bcb9f0aa2e064afaa4a38e
7
+ data.tar.gz: 045aad20c787141b0f29f7d2ed044be8d9558e841e67ed4121f42ca1014880f0c1ee5bd6088712f5693e96fbe8cd389423d2675638c9bbcc4ad22850f32d8c31
data/CHANGES.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # The chenge history of Pandas wrapper for Ruby
2
2
 
3
+ ## 0.3.8
4
+
5
+ * Add `to_iruby_mimebundle` in `Pandas::DataFrame`
6
+
3
7
  ## 0.3.7
4
8
 
5
9
  * Avoid circular require warning
@@ -10,5 +10,25 @@ module Pandas
10
10
  def to_narray
11
11
  to_numpy.to_narray
12
12
  end
13
+
14
+ def to_iruby_mimebundle(include: [], exclude: [])
15
+ include = ["text/html", "text/latex", "text/plain"] if include.empty?
16
+ include -= exclude unless exclude.empty?
17
+ include.map { |mime|
18
+ data = case mime
19
+ when "text/html"
20
+ _repr_html_
21
+ when "text/latex"
22
+ _repr_latex_
23
+ when "text/plain"
24
+ if respond_to?(:_repr_pretty_)
25
+ _repr_pretty_
26
+ else
27
+ __repr__
28
+ end
29
+ end
30
+ [mime, data] if data
31
+ }.compact.to_h
32
+ end
13
33
  end
14
34
  end
@@ -1 +1 @@
1
- PANDAS_VERSION = "0.3.7"
1
+ PANDAS_VERSION = "0.3.8"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pandas
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenta Murata
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-06-24 00:00:00.000000000 Z
11
+ date: 2021-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pycall