Fold multiple columns: selection of columns

UserBird
UserBird Dataiker, Alpha Tester Posts: 535 Dataiker
Hi,

I would like to fold a dataset with several columns into one single columns. So I would like to use the built-in function "Fold multiple columns".

The only annoying thing is that I would have 1739 columns to select. It is fairly time-consuming to do this by hand. Would there be any sort of trick to select all the columns, instead of typing each name? I can use a script in R or Python but I was wondering if there was a way to do it in a preparation script.

I tried to select the columns and use the "mass action" but the fold command cannot be found.

Many thanks !

Best regards,

Best Answer

  • Clément_Stenac
    Clément_Stenac Dataiker, Dataiku DSS Core Designer, Registered Posts: 753 Dataiker
    Answer ✓
    Hi Raphaëlle,

    If there is a common pattern of names to the columns that you want to fold, you can use the "Fold multiple columns by pattern" processor, which let you fold all columns matching a regexp.

    Note that using a "negative lookahead" regexp, you can also, to some extent, use this processor to "fold all columns except"

Answers

Setup Info
    Tags
      Help me…