Date in number into text

Options
Srovalo
Srovalo Registered Posts: 2

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?

Answers

  • tgb417
    tgb417 Dataiku DSS Core Designer, Dataiku DSS & SQL, Dataiku DSS ML Practitioner, Dataiku DSS Core Concepts, Neuron 2020, Neuron, Registered, Dataiku Frontrunner Awards 2021 Finalist, Neuron 2021, Neuron 2022, Frontrunner 2022 Finalist, Frontrunner 2022 Winner, Dataiku Frontrunner Awards 2021 Participant, Frontrunner 2022 Participant, Neuron 2023 Posts: 1,595 Neuron
    Options

    @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.

Setup Info
    Tags
      Help me…