pdtable 0.1.0 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 528be4e5de0a9be19e667af047153f4d20d2fc4b
4
- data.tar.gz: fde7df6d5616264038311e45f02ee19ebcd858fe
3
+ metadata.gz: efa157e295c09895d46af88ab10d82bc9d1eae49
4
+ data.tar.gz: dc08526f99df4e1ab0be1e5cfedea8fe44cca3d0
5
5
  SHA512:
6
- metadata.gz: c1454cdfecccf57c741de8d6e7c232d7eca97332fb1e36d4a6505a4aed788455a7ab322970e488d655556747c0eb748857357019f064a97b08bb67d3fb8ab019
7
- data.tar.gz: 207f5c5e46a6459e23bf28d2c892b544014945b9ba092bac10c4883e262e787a1287ca43ce46c7f33c2ea1db94c0cedb7b2e69d4d765f85f079dfb92c3d57427
6
+ metadata.gz: 884417e4c97205a05fd69316d4cce1ad77c9dd864dd3e3ec3e697df7679be34f70e28d670b2ed36fd51f42865e6b05950fb286f56693a381cb0b065f65063416
7
+ data.tar.gz: '0349127c0cca59429a52edc6db00419cd5a1e73a5f308f1484737278b26929d64016faefd44dbd0d5d650204c7850ede9ed2fe3b8c56bb9bce7370387d16a502'
data/README.md CHANGED
@@ -22,7 +22,7 @@ Or install it yourself as:
22
22
 
23
23
  ### Read CSV
24
24
 
25
- You can read CSV with `Pdtable::Pdtable.new`.
25
+ You can read CSV with `Pdtable::Table.new`.
26
26
 
27
27
  ```sh
28
28
  $ cat test/csv/default.csv
@@ -33,8 +33,8 @@ date,datetime,integer,float,string
33
33
  ```
34
34
 
35
35
  ```ruby
36
- > t = Pdtable::Pdtable.new 'test/csv/default.csv'
37
- => #<Pdtable::Pdtable mode:col_or_row row_count:4>
36
+ > t = Pdtable::Table.new 'test/csv/default.csv'
37
+ => #<Pdtable::Table mode:col_or_row row_count:4>
38
38
 
39
39
  > puts t
40
40
  date,datetime,integer,float,string
@@ -57,14 +57,14 @@ date,datetime,integer,float,string
57
57
  ### Options
58
58
 
59
59
  ```ruby
60
- > t = Pdtable::Pdtable.new 'test/csv/default.csv', dtype: {date: Date, float: String}
61
- => #<Pdtable::Pdtable mode:col_or_row row_count:4>
60
+ > t = Pdtable::Table.new 'test/csv/default.csv', dtype: {date: Date, float: String}
61
+ => #<Pdtable::Table mode:col_or_row row_count:4>
62
62
 
63
63
  > t.to_a
64
64
  => [[:date, :datetime, :integer, :float, :string], [#<Date: 2017-01-01 ((2457755j,0s,0n),+0s,2299161j)>, #<DateTime: 2017-01-01T00:00:00+00:00 ((2457755j,0s,0n),+0s,2299161j)>, 1, "1.1", "string1"], [#<Date: 2017-01-02 ((2457756j,0s,0n),+0s,2299161j)>, #<DateTime: 2017-01-02T00:00:00+00:00 ((2457756j,0s,0n),+0s,2299161j)>, 2, "2.2", "string2"], [#<Date: 2017-01-03 ((2457757j,0s,0n),+0s,2299161j)>, nil, 3, "3.3", "string3"]]
65
65
 
66
- > t = Pdtable::Pdtable.new 'test/csv/default.csv', skiprows: 0
67
- => #<Pdtable::Pdtable mode:col_or_row row_count:3>
66
+ > t = Pdtable::Table.new 'test/csv/default.csv', skiprows: 0
67
+ => #<Pdtable::Table mode:col_or_row row_count:3>
68
68
 
69
69
  > puts t
70
70
  date,datetime,integer,float,string
@@ -72,8 +72,8 @@ date,datetime,integer,float,string
72
72
  2017-01-03T00:00:00+00:00,,3,3.3,string3
73
73
  => nil
74
74
 
75
- > t = Pdtable::Pdtable.new 'test/csv/default.csv', skiprows: [1, 2]
76
- => #<Pdtable::Pdtable mode:col_or_row row_count:2>
75
+ > t = Pdtable::Table.new 'test/csv/default.csv', skiprows: [1, 2]
76
+ => #<Pdtable::Table mode:col_or_row row_count:2>
77
77
 
78
78
  > puts t
79
79
  date,datetime,integer,float,string
@@ -2,7 +2,7 @@ require "pdtable/version"
2
2
  require 'csv'
3
3
 
4
4
  module Pdtable
5
- class Pdtable < CSV::Table
5
+ class Table < CSV::Table
6
6
  def initialize(path, dtype: nil, skiprows: nil)
7
7
  @table = CSV.table path
8
8
  @mode = :col_or_row
@@ -1,3 +1,3 @@
1
1
  module Pdtable
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdtable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - kohei-kimura