Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added check if there is no hourly data to output #1214

Merged
merged 1 commit into from
Sep 20, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,11 @@ def output_hourly_data(model, output_folder,datapoint_id)
end

CSV.open(csv_output, "wb") do |csv|
csv << array_of_hashes.first.keys # adds the attributes name on the first line
array_of_hashes.each do |hash|
csv << hash.values
unless array_of_hashes.empty?
csv << array_of_hashes.first.keys # adds the attributes name on the first line
array_of_hashes.each do |hash|
csv << hash.values
end
end
end
end
Expand Down