Sha256: 2bf9caa8d72fc2de3b7d5a3f5dad1dd9c5af3e3599a44e6ce8a026395a4dd7c3
Contents?: true
Size: 366 Bytes
Versions: 3
Compression:
Stored size: 366 Bytes
Contents
module Quandl module Operation class Value class << self def precision(data, prec=14) r = [] data.each do |row| new_row = [row[0]] row[1..-1].each do |v| new_row << (( v.nil? || v == Float::INFINITY ) ? v : Float("%.#{prec}g" % v)) end r << new_row end r end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
quandl_operation-0.4.1 | lib/quandl/operation/value.rb |
quandl_operation-0.4.0 | lib/quandl/operation/value.rb |
quandl_operation-0.3.2 | lib/quandl/operation/value.rb |