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
[SOLVED]numeric values in csv files was not correctly imported using readcsv
huaiyanggongzi
Member Posts: 39 Contributor II
I am using the "read csv" operator to import csv, and found several issues of using it. The following is an illustration process, read a csv and write it to another csv. In the original csv, the first column is
Here is the input csv file
Here is the output csv file
The following is the process script
, but the output csv file get empty cell for the corresponing position.
3E+11
Here is the input csv file
column1 column2 3.10E+11 F 3.10E+11 F |
column1 column2 F F |
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.3.008">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.3.008" expanded="true" name="Process">
<description>This getting started process shows the first step of learning and storing a model.
After a model is learned, you can load (Retrieve operator) the model and apply it to a test data set (see 2. Getting Started: Retrieve and Apply Model). The process is NOT concerned with evaluation of the model.
This process will not immediately run in RapidMiner because you have to adjust the repository path in the Retrieve operator.
Tags: Rapidminer, model, learn, learning, store, first step</description>
<process expanded="true">
<operator activated="true" class="read_csv" compatibility="5.3.008" expanded="true" height="60" name="Read CSV" width="90" x="45" y="75">
<parameter key="csv_file" value="C:\Users\Desktop\test\test7.csv"/>
<parameter key="column_separators" value=","/>
<parameter key="first_row_as_names" value="false"/>
<list key="annotations">
<parameter key="0" value="Name"/>
</list>
<parameter key="encoding" value="GBK"/>
<list key="data_set_meta_data_information">
<parameter key="0" value="column1.true.real.attribute"/>
<parameter key="1" value="column4.true.binominal.label"/>
</list>
</operator>
<operator activated="true" class="write_csv" compatibility="5.3.008" expanded="true" height="76" name="Write CSV" width="90" x="514" y="165">
<parameter key="csv_file" value="C:\Users\Desktop\test\test7-copy.csv"/>
<parameter key="column_separator" value=","/>
</operator>
<connect from_op="Read CSV" from_port="output" to_op="Write CSV" to_port="input"/>
<connect from_op="Write CSV" from_port="through" to_port="result 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
</process>
</operator>
</process>
0
Answers
thank you for reporting this. Looks like you stumbled across a bug. I have created a ticket in our internal issue tracker for it.
Regards,
Marco