You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We don't actually calculate commodity prices yet, but this issue could still be tackled with some dummy values for now.
There is a file output.rs where this code could potentially live. You could either implement this as a single function or you could approach it in a more OOP-y style and make a ResultsWriter object (or something), which could house the path to the output directory along with the file handles for the different CSV files (obvs you'd only need one for this issue).
I think the best way to implement this is to make a struct representing a row of the CSV file and then mark it as #[derive(Serialize)]. Then you should be able to write it using the csv package.
We will need columns for milestone year, commodity ID, time slice and price. We may also need others at some point, but these should do for now.
The text was updated successfully, but these errors were encountered:
We don't actually calculate commodity prices yet, but this issue could still be tackled with some dummy values for now.
There is a file
output.rs
where this code could potentially live. You could either implement this as a single function or you could approach it in a more OOP-y style and make aResultsWriter
object (or something), which could house the path to the output directory along with the file handles for the different CSV files (obvs you'd only need one for this issue).I think the best way to implement this is to make a struct representing a row of the CSV file and then mark it as
#[derive(Serialize)]
. Then you should be able to write it using thecsv
package.We will need columns for milestone year, commodity ID, time slice and price. We may also need others at some point, but these should do for now.
The text was updated successfully, but these errors were encountered: