The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
"Order of Attributes in the CSV file"
Hi,
Thanks and Regards,
Shubha
<operator name="Root" class="Process" expanded="yes">I want to write the data generated to a CSV file. While writing, the special attribute, 'label' is written as the last attribute in the CSV file, check.csv. But I need to write the data as the order appears in the Exampleset like (label,att1,att2,att3,att4,att5). Any hints on this?
<operator name="ExampleSetGenerator" class="ExampleSetGenerator">
<parameter key="target_function" value="random"/>
<parameter key="number_examples" value="10"/>
</operator>
<operator name="ChangeAttributeRole" class="ChangeAttributeRole" activated="no">
<parameter key="name" value="label"/>
</operator>
<operator name="CSVExampleSetWriter" class="CSVExampleSetWriter" breakpoints="before">
<parameter key="csv_file" value="check.csv"/>
<parameter key="column_separator" value=","/>
</operator>
</operator>
Thanks and Regards,
Shubha
Tagged:
0
Answers
You get that column order control using the special format option on the ExampleSetWriter, like this..
Thanks