Is there any way to move the negative to the left side on DataPrep?

66 views Asked by At

I have this DataFrame which was exported from SAP, and it comes with the negative numbers like these

   a   b   c
0  1   2-  3-
1  4-  5   6
2  7   8-  9-

Is there any way to move the (-) sign to the left side on Google Cloud DataPrep?

1

There are 1 answers

0
Amit Miller On BEST ANSWER

Few ways of doing that, let's cover a simple one -

  1. Using find-replace transformation, with grouping : List item {number} is Trifacta pattern for any kind of number (int\dec)

    ({number}) saves this pattern as "group 1", later reference at the "replace" field.

    We're just deleting the suffix "-", and adding one of our own at the beginning.

    Notice that by "trying to find the minus suffix" we're making sure we're not adding a minus where it's not needed.