Closed BaptisteVandecrux closed 3 years ago
nead file writer developed by Derek and Rebecca at the moment it needs to be given as input a "ini" text file that contains basically the nead header without the '#'
import pytest import numpy as np import nead fname = "sample.csv" def test_write(): ds = nead.read(fname, index_col=0, MKS=True) df = ds.to_dataframe() df = df.reset_index() nead.write(df, nead_config = 'sample_header.ini', output_path = 'sample_out.csv') ds2 = nead.read('sample_out.csv', index_col=0, MKS=True) print(ds2)
Later on we can make a routine that builds the ini file from the metadata contained in a xarray or dataframe
nead file writer developed by Derek and Rebecca at the moment it needs to be given as input a "ini" text file that contains basically the nead header without the '#'
Later on we can make a routine that builds the ini file from the metadata contained in a xarray or dataframe