Crates.io | make-csv |
lib.rs | make-csv |
version | 0.1.0 |
source | src |
created_at | 2023-10-29 12:33:54.49459 |
updated_at | 2023-10-29 12:33:54.49459 |
description | Simple macro's that make writing csv files for plotting purposes easy. |
homepage | |
repository | |
max_upload_size | |
id | 1017518 |
size | 38,966 |
This is just a very simple crate which implements four macro rules which can be helpful
for creating .csv
files and plottin them using Python
.
use make_csv::{csv_start, csv_entry, csv_stop, python};
// create csv writer for file "data.csv"
let mut wtr = csv_start!("data.csv");
// add header and one data row
csv_entry!(wtr <- "header_0", "header_1");
csv_entry!(wtr <- 0.0, 1.0);
// flush the writer
csv_stop!(wtr);
// use python script to plot the data
python!("plot.py", "data.scv");