How to pivot from column to rows

Tags
Registered Posts: 29

I have data that has a column with the days of the week, source and season. I'm trying to split my days column to rows.

I have picture of my current input and expected output. I tried to use the split function but that split the days into different columns not rows.

is there a way to get my desired output using dataiku?

Input

piv.PNG

Output

piv2.PNG


Operating system used: windows


Operating system used: windows

Welcome!

It looks like you're new here. Sign in or register to get started.

Answers

  • Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,315 Neuron

    This is probably easier to do in Python but I am not sure if you are looking for a solution using visual recipes or code recipes. Also are the number of days in the Days column always 7 and always all the days of the week (ie Mon-Sun)? Are you using a SQL dataset?

  • Registered Posts: 29

    so ideally, I was looking for a visual solution or via code in the prepare recipe. sometimes the number of days can be 1 or 2 Ex. WED,THU

  • Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,315 Neuron

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.