CSV.jl
CSV.jl copied to clipboard
Need a feature to handle an extra unit row
It is a common practice to have a 2nd unit row below the headers. An example is as below:
Year, Month, Day, Temperature, Oxygen
'', '', '', 'oC', 'umol/kg'
2020, 5, 12, 26.7, 200
2021, 1, 16, 5.2, 156
...
I wonder if you could please consider adding such a feature, so that we can define the unit of each parameter when defining the dataframe step? Maybe something like below?
df = DataFrame( Year = TT[:,1], Month = TT[:,2], Day = TT[:,3], Temperature = TT[:,4], Oxygen = TT[:,5] );
df.units = {"", "", "", "oC", "umol/kg"};
F1 = "sample.csv"; CSV.write(F1, df, unitrow = 2);
I'm not exactly sure what the request here is. Something for CSV.jl or DataFrames.jl?