Hi,
I'm working with relative large csv files (±150MB), The files start with two rows that need to be combined as the column header.
I wrote a script that loop through each column and set the column name to the current name + the value of the first row.
The problem it is running very slow, sometimes I need to wait ±10min for changing the name of 4000 columns.
It is somehow depends on the file size, changing the same amount of column in a small file takes few seconds.
I tried few workarounds -
1. subset only the first row and changing all column names (very fast). I then thought I'll concatenate the original table, but I can't do it because the column names now are not same.
2. updating the CSV import setting as suggested here. but I still don't see an option to include two rows as header.
3. export the file as xls and then import it with two rows as header. the export time is longer than the original column name change.
Is there another workaround that I'm missing, maybe there is an option to change all column names based on a list?
Thanks in advance for the helpers.