Exporting dataset to CSV results in extra rows with #NAMES & #TYPES

I have a button script that uses system.tag.queryTagHistory and assigns the results to a custom property on root. My export script looks like this:

data = self.view.getChild("root").custom.data
csv = system.dataset.toCSV(data, True, True)
system.perspective.download('data_export.csv', csv)

The resulting export has additional rows as seen below.

"t_stamp","POI/SEL735/Voltage A"
"2024-02-23 13:00:00.972","20.496688842773438"
"2024-02-23 13:00:02.983","20.49338150024414"

the binding can be seen here:


That's what the forExport parameter you set to True does.


Thanks Kevin! That did it!