Options

parse error when changing attribute type from polynomial to date_time [SOLVED]

SabrineSabrine RapidMiner Certified Analyst Posts: 3 Contributor I
edited November 2018 in Help
hello everyone,
while importing a CSV file, RM did automatically set the type of a date-time attribute as a polynomial. The attribute has the following format: JJJJ.mm.dd hh:mmm:ss which is different from the date format of the data we used during RM training "Month day, year time". Changing the attribute type manually does not work and an error message " parsing error" is displayed for all examples of this attribute. Anyone can help?

Tagged:

Answers

  • Options
    Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University Professor Posts: 1,996 RM Engineering
    Hi,

    what version of Studio are you using? 7.0 and later have the Date format in the top left corner during the "Format your columns" step while adding data. You can freely change the date format there to whatever you need.

    image

    Regards,
    Marco
  • Options
    SabrineSabrine RapidMiner Certified Analyst Posts: 3 Contributor I
    Marco Boeck wrote:

    Hi,

    what version of Studio are you using? 7.0 and later have the Date format in the top left corner during the "Format your columns" step while adding data. You can freely change the date format there to whatever you need.

    image

    Regards,
    Marco
    Hi Marco,
    Thank you for your answer, I am using the 7.0 version and already tried all possible data formats in RM but none worked for this type JJJJ.mm.dd hh:mm:ss. What I did now is setting a costum date format in excel for the original data that is compatible with one of the formats in RM ( in this case JJJJ-MM-DD HH:MM:SS which was recognized by RM). It is not that much fun however to do it for 20 columns (especially if I find out during importing data that I have overseen a date column and then have to go back to the original excel data file and change the format there!). Is there a way to fix this directly in RM?
    Regards,
    Sabrine
  • Options
    Marco_BoeckMarco_Boeck Administrator, Moderator, Employee, Member, University Professor Posts: 1,996 RM Engineering
    Hi,

    yea changing the source data is definetly not the way you want to go ;D

    This works for me:

    1. Change the Data Format to "yyyy.MM.dd hh:mm:ss"
    2. Change the colum type to "date_time"

    image

    The test data I used can be found here: https://www.dropbox.com/s/ivrn8o70iie9f71/test.csv?dl=0

    Regards,
    Marco
  • Options
    MartinLiebigMartinLiebig Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,517 RM Data Scientist
    By the way,

    you might also simply read it in as nominal and use Nominal To Date afterwards.

    ~Martin
    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
  • Options
    SabrineSabrine RapidMiner Certified Analyst Posts: 3 Contributor I
    Martin Schmitz wrote:

    By the way,

    you might also simply read it in as nominal and use Nominal To Date afterwards.

    ~Martin
    Martin Schmitz wrote:

    By the way,

    you might also simply read it in as nominal and use Nominal To Date afterwards.

    ~Martin
    Marco Boeck wrote:

    Hi,

    yea changing the source data is definetly not the way you want to go ;D

    This works for me:

    1. Change the Data Format to "yyyy.MM.dd hh:mm:ss"
    2. Change the colum type to "date_time"

    image

    The test data I used can be found here: https://www.dropbox.com/s/ivrn8o70iie9f71/test.csv?dl=0

    Regards,
    Marco
    Thank you marco this works! sorry that I didnt notice that a custom data format can be typed directly there ( thought I can only select from the list below!). By the way I just tried doing the same thing using the operator "nominal to date"  (same idea as Martin) and it works too, the only inconvenience is that no attribute subset selection is possible.
    Many thanks,
    sabrine
  • Options
    sofian_mesbahisofian_mesbahi Member Posts: 4 Contributor I

    Trying to input this date_time: July 13, 2016 05:43 AM

    with this date format u provided here: yyyy.MM.dd hh:mm:ss

    And I still get parsing errors?

     

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

    I'm an old school RM user, I don't use the "Add Data" button that much and go straight for the Read CSV or Read Excel operator and use that wizard.

     

    I find it much easier to do as @mschmitz notes, let the date values come in as a polynominals and then convert them with a Nominal to Date operator.

  • Options
    sofian_mesbahisofian_mesbahi Member Posts: 4 Contributor I

    Alright thanks will do that! :smileyvery-happy:

Sign In or Register to comment.