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
Prevent write csv from converting reals to strings
I've used 'Score Test Data' operator to produce a scored dataset. I now want to export this to a csv. I used 'Write CSV' operator, chose ',' as the separator, and UTF-8 encoding. I only checked the box for 'write attribute names'.
After running, the scored dataset does have the scores as 'reals' (type of data), as confirmed in the 'Statistics' tab.
However, when I open the csv file that was created, the scored variable values have been converted to string (the operator added an apostrophe in front of every real value).
How to stop 'Write CSV' from doing this?
(I know how to manipulate the csv file and reconvert strings to reals. But this is a pain to do every time, much better to use 'Write CSV' correctly; if it is a bug in 'Write CSV', better to fix it.)
After running, the scored dataset does have the scores as 'reals' (type of data), as confirmed in the 'Statistics' tab.
However, when I open the csv file that was created, the scored variable values have been converted to string (the operator added an apostrophe in front of every real value).
How to stop 'Write CSV' from doing this?
(I know how to manipulate the csv file and reconvert strings to reals. But this is a pain to do every time, much better to use 'Write CSV' correctly; if it is a bug in 'Write CSV', better to fix it.)
0
Answers
I've just tested this from my side, and it appears to be working as expected (writes out without adding apostrophes). Could you possibly share your process and example data and I can take a look? Also could I just confirm which version you are using?
Best,
Roland
I've attached the scored data file and process.