New to Dataiku DSS? Try out our NEW Quick Start Programs today and get onboarded on the product in just one hour! Let's go

Rename multiple column to remove spaces and comma

Solved!
FaridSuharjo
Level 1
Rename multiple column to remove spaces and comma
I try to join two data sets, but returns the following error: "Column name can not contain comma, quotation mark, leading or trailing white spaces with DSS engine"

Is there any way to remove multiple columns in mass to remove spaces and comma?
1 Solution
Alan_Fusté
Level 3
Level 3

Hi Farid,



You can do it with a Python Recipe using:




df.columns = df.columns.str.replace(',', '').replace(' ','')


Another option is to use a Preparation Recipe and add step "Rename Columns" but you have to change each column manually.

View solution in original post

0 Kudos
1 Reply
Alan_Fusté
Level 3
Level 3

Hi Farid,



You can do it with a Python Recipe using:




df.columns = df.columns.str.replace(',', '').replace(' ','')


Another option is to use a Preparation Recipe and add step "Rename Columns" but you have to change each column manually.

View solution in original post

0 Kudos
Labels (2)
A banner prompting to get Dataiku DSS