WebPlotDigitizer icon indicating copy to clipboard operation
WebPlotDigitizer copied to clipboard

Dataset name missing from Y columns in CSV header

Open Entropy512 opened this issue 1 year ago • 0 comments

Currently, CSVs are exported in a manner that would make sense for a format that supports merged cells, but CSV does not support this. Instead, the dataset name should be included for every column, not just the X columns. The current format breaks the ability to load a dataset with Python Pandas' load_csv() function into a MultiIndex dataframe, for example.

Currently, the CSV header looks like this:

Red,,Green,,Blue,
X,Y,X,Y,X,Y

To make the headers easier to parse, it should look like this:

Red,Red,Green,Green,Blue,Blue
X,Y,X,Y,X,Y

The latter format loads into a Pandas MultiIndex dataframe easily

Entropy512 avatar Apr 30 '24 00:04 Entropy512