Skip to content

Commit

Permalink
Merge #6
Browse files Browse the repository at this point in the history
  • Loading branch information
domitry committed Aug 1, 2014
2 parents cd12354 + 5360f6f commit 1b51dc0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
6 changes: 2 additions & 4 deletions lib/nyaplot/data.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,8 @@ def self.from_csv(*args)
yield csv if block_given?

head = if opts[:headers]
csv.headers
else
csv.readline
end
csv.headers if opts[:headers]
end

rows = []
csv.each do |row|
Expand Down
4 changes: 2 additions & 2 deletions spec/data_spec.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
require 'spec_helper'
require 'pry'

describe Nyaplot::DataFrame do
context ".from_csv" do
Expand All @@ -17,7 +16,8 @@
end

expect(df.column_labels).to eq(["image_resolution", "true_transform", "mls"])
expect(df["image_resolution"].first).to eq(6.55779)
expect(df.column('true_transform').first[15]).to eq(1.0)
end
end
end
end

0 comments on commit 1b51dc0

Please sign in to comment.