Fold multiple columns: selection of columns

Solved!
UserBird
Dataiker
Fold multiple columns: selection of columns
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,
0 Kudos
1 Solution
Clรฉment_Stenac
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"

View solution in original post

0 Kudos
2 Replies
Clรฉment_Stenac
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"
0 Kudos
neilpatel
Level 2

What is the proper syntax for this regexp, i.e. fold all columns except?

0 Kudos