Created
May 30, 2012 22:55
-
-
Save mtmcfarl/2839433 to your computer and use it in GitHub Desktop.
appending to csv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'csv' | |
CSV.open('new_list.csv', 'wb') do |csv_out| | |
CSV.foreach('data.csv', :headers => true, :return_headers => true) do |rec| | |
csv_out << rec | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment