Split and rename columns

jasonsnare
Level 1
Split and rename columns

Hello!

I have one dataset and I want to split all the columns values (Starting from the column "180 COOL", using || delimiter) and then rename it like attached example. Please let me know if anyone has python code to do this process.

In the provided example screenshot need to split 4 columns. the real dataset contains 7000 columns split and rename.


0 Kudos
1 Reply
CatalinaS
Dataiker

Hi @jasonsnare,

You can get the desired output without using Python code.

You can use a Prepare recipe with below steps:

- use split function and delimiter "||" in order to split the original column by delimiter and create two separate columns

Screenshot 2023-04-11 at 19.17.27.png

- remove the original columns

Screenshot 2023-04-11 at 19.21.36.png

- rename the columns name

Screenshot 2023-04-11 at 19.20.10.png

โ€ƒ

 

 

Setup info

?
Tags (1)
A banner prompting to get Dataiku