simple helper functions for reading and saving CSV files
- modulus.csv_utils.csv_rw.csv_to_dict(filename, mapping=None, delimiter=',')
reads a csv file to a dictionary of columns
- filenamestr
- mappingNone, dict
- delimiter: str
The file name to load from
If None load entire csv file and store every column as a key in the dict. If mapping is not none use this to map keys from CSV to keys in dict.
The string used for separating values.
- datadict of numpy arrays
numpy arrays have shape [N, 1].
- modulus.csv_utils.csv_rw.dict_to_csv(dictonary, filename)
saves a dict of numpy arrays to csv file
- dictionarydict
- filenamestr
dictionary of numpy arrays. The numpy arrays have a shape of [N, 1].
The file name to save too