TableTool icon indicating copy to clipboard operation
TableTool copied to clipboard

Choose header row

Open llamafilm opened this issue 7 years ago • 4 comments

Some formats of CSV use a header with a few plain text lines at the top, before the line that defines the column names. I'd like to be able to choose which line is used as the "Header" in Table Tool. Perhaps by right-clicking a row. Example attached. report-411951434879-2017-02-01.csv.txt

llamafilm avatar Sep 29 '17 14:09 llamafilm

I believe that file format is too non-standard and I do not recommend that we support it.

fulldecent avatar Jul 05 '18 20:07 fulldecent

It's true that this sample is a non-standard format, but there are many different softwares that use header rows. So I'm suggesting a way to choose an arbitrary number of header rows, for example by right-clicking a row. My last example was from Ecobee thermostat. Here is different example of an ALE (Avid Log Exchange), which is basically a tsv.

All Takes.ale.txt

llamafilm avatar Jul 05 '18 21:07 llamafilm

It's pretty common to see multiple non-data rows at the top of a CSV file, my energy company even provides hourly reports that have a bunch of info at the top that aren't "data headers", so I think "non-standard" isn't a strong argument.

not all CSV files are made equal

dctucker avatar Aug 23 '18 23:08 dctucker

That file is a chunked file. Even if you start reading at the header row there is still an extra "data" label row.

If you start reading the file by truncating some rows then what happens when you save the file? Will that data be silently truncated? That would be bad.

If it is not silently truncated then there are two problems: a) how to set up the "loading" screen to figure everything out? b) how to display the extra data on the screen when it is not a row or a column?


I don't see a clean solution to these problems. Prove me wrong, if there is a UI with screenshots that you can show which show this is feasible I'd like to see it. If we are supporting any data file then all the options on this page would be in scope for TableTool --- https://pandas.pydata.org/pandas-docs/stable/generated/pandas.read_csv.html

I don't mind having a million options like that. But if we're going to do that then we should have a clear path and UI idea before starting this journey of supporting yet more weird data file formats.

fulldecent avatar Aug 24 '18 02:08 fulldecent