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

Months of a year to winter summer and fall

gohelgohel Member Posts: 6 Contributor II
Hi everyone,
I was trying to convert months(Jan, Feb, Mar....) into winter, summer and fall and using the below mentioned code in Generate attribute operator, But it's showing me the error shown below.
Can anyone help me out??


if(pickup_month<4,"winter",if(pickup_month<7,"summer",if(pickup_month<11,"Fall","winter")))






Best Answer

  • BalazsBaranyBalazsBarany Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    Solution Accepted
    Hi,

    I tested your expression with generated data (pickup_month had the data type "integer") and Generate Attributes worked. 

    Make sure that your attribute is numeric. If it isn't, the < operator won't work.

    Regards,

    Balázs
Sign In or Register to comment.