Dynamically rename bad column names

I have a table with a lot of column names that look like this

However since these are dates, they will change over time, so I can’t use the multiple column rename processor.
When I try to use the query helper with the following custom table:
image

I get an error and it subtracts the numbers like this (2022-03)-15 instead of selecting the respective column.
image

Therefore I would like to rename the columns first (like c_2022-03-15, so that I can use them in the query helper and name them back to their original values afterwards.
How can I do this?

Hi Thomas, for your case instead of renaming it should also possible to quote the column names with backticks `2022-02-05` .
If you want to rename the columns, you could use something like this in a Python Processor:

dataset.columns = dataset.columns.str.replace("^", "c_", regex=True)
1 Like