Skip to content

Instantly share code, notes, and snippets.

@ledlogic
Created January 25, 2015 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ledlogic/7d0d9726158f11c8a8a3 to your computer and use it in GitHub Desktop.
Save ledlogic/7d0d9726158f11c8a8a3 to your computer and use it in GitHub Desktop.
Ruby program to load single column CSV file and compute descriptive statistics.
require 'csv'
require 'descriptive_statistics'
#data array to store values
data = []
# load data
CSV.foreach('20150124.csv') do |row|
data << row[0]
end
puts data.descriptive_statistics
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment