Date in number into text

Srovalo
Level 1
Date in number into text

Hello 

I have a month column and the rows are in the numbers of the month (1-12), I whant to change the number of the month into text, for example 1=Jan, 2=Feb,.....

How can I change that in the prepare recipe?

0 Kudos
1 Reply
tgb417

@Srovalo 

Welcome to the Dataiku Community! We are so glad to have you joining us.

There are lots of different ways to do what you are describing.  Some that are better processing text numbers and even dates.

The visual prepare recipe is often a good place to start.  In this kind of recipe you can add a find and replace step.  This will allow you to say that 1 become โ€œJanโ€, 2 become โ€œFebโ€.

https://doc.dataiku.com/dss/latest/preparation/processors/find-replace.html

For 12 item list of the Months of the year that is not a bad method.

However, it this case if you need to sort these for any reason later in your flow.  The order Apr, Aug, Dec โ€ฆ. Which is often not very useful.  Sometime is is better to convert these values into actual date of the first of the month.  Just something to consider based on your particular use case.

You can learn a lot more about the visual prepare recipe on this page in the documentation.  https://doc.dataiku.com/dss/latest/preparation/index.html

I can also recommend working through the Free Basic Academy course found here.  

https://academy.dataiku.com/page/core-concepts

Have a great day.  I hope this helps.

--Tom