Rename headers dataset

Does anybody have a way (without loop) to rename the headers of a dataset in a script?

How do you get your new header ?

header = ['a', 'b', 'c', 'd']
data = system.dataset.toPyDataSet(value)
return system.dataset.toDataSet(header, data)

Why do you need to rename the headers? Or, where is the data coming from? You usually want to leave data as is and only use human-readable representations as part of the “frontend”.

I want to export the data of a perspective table.
Filtered (dataset) or not filtered (JSON).
While exporting I don’t want to include the non-visible headers.
Also, I want to include the translation of the header names (titles), so it will be in a way the user can easily understand.