Options

changing attribute type from polynomial to Datetime makes all that attribute's value as null ("?")

inayauzma828inayauzma828 Member Posts: 1 Learner I

hi...i m a beginner ...and stuck in importing dataset and changing proper attribute type.

while changing attribute type of date and time format from polynomial to Date time all the corresponding value of that attributes becomes null i.e "?"......

my attribute value is like say,   10/28/2013 16:04 and i set the date format as

MM/dd/yyyy HH:mm

can someone help me please?

Answers

  • Options
    Thomas_OttThomas_Ott RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,761 Unicorn

    @inayauzma828 it works for me using a Nominal to Date operator and setting it to date_time and MM/dd/yyyy HH:mm

     

    You can also set it in a Read CSV operator directly like so:

     

    <?xml version="1.0" encoding="UTF-8"?><process version="8.1.001">
    <context>
    <input/>
    <output/>
    <macros/>
    </context>
    <operator activated="true" class="process" compatibility="8.1.001" expanded="true" name="Process">
    <process expanded="true">
    <operator activated="true" class="read_csv" compatibility="8.1.001" expanded="true" height="68" name="Read CSV" width="90" x="45" y="34">
    <parameter key="csv_file" value="C:\Users\TomOtt\Downloads\Kaggle_YourCabs_training.csv"/>
    <parameter key="column_separators" value=","/>
    <parameter key="date_format" value="MM/dd/yyyy HH:mm"/>
    <parameter key="first_row_as_names" value="false"/>
    <list key="annotations">
    <parameter key="0" value="Name"/>
    </list>
    <parameter key="encoding" value="windows-1252"/>
    <list key="data_set_meta_data_information">
    <parameter key="0" value="id.true.integer.attribute"/>
    <parameter key="1" value="user_id.true.integer.attribute"/>
    <parameter key="2" value="vehicle_model_id.true.integer.attribute"/>
    <parameter key="3" value="package_id.true.polynominal.attribute"/>
    <parameter key="4" value="travel_type_id.true.integer.attribute"/>
    <parameter key="5" value="from_area_id.true.integer.attribute"/>
    <parameter key="6" value="to_area_id.true.polynominal.attribute"/>
    <parameter key="7" value="from_city_id.true.polynominal.attribute"/>
    <parameter key="8" value="to_city_id.true.polynominal.attribute"/>
    <parameter key="9" value="from_date.true.date_time.attribute"/>
    <parameter key="10" value="to_date.true.polynominal.attribute"/>
    <parameter key="11" value="online_booking.true.integer.attribute"/>
    <parameter key="12" value="mobile_site_booking.true.integer.attribute"/>
    <parameter key="13" value="booking_created.true.date_time.attribute"/>
    <parameter key="14" value="from_lat.true.real.attribute"/>
    <parameter key="15" value="from_long.true.real.attribute"/>
    <parameter key="16" value="to_lat.true.polynominal.attribute"/>
    <parameter key="17" value="to_long.true.polynominal.attribute"/>
    <parameter key="18" value="Car_Cancellation.true.integer.attribute"/>
    <parameter key="19" value="Cost_of_error.true.real.attribute"/>
    </list>
    </operator>
    <operator activated="false" class="nominal_to_date" compatibility="8.1.001" expanded="true" height="82" name="Nominal to Date" width="90" x="45" y="136">
    <parameter key="attribute_name" value="from_date"/>
    <parameter key="date_type" value="date_time"/>
    <parameter key="date_format" value="MM/dd/yyyy HH:mm"/>
    </operator>
    <connect from_op="Read CSV" from_port="output" 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>
Sign In or Register to comment.