Replace special characters using RegEx in Tableau, Alteryx and python

by Oksana Kirschbaum

Sometimes some letters are displayed incorrectly because files have been misread or formatted.

If the correct Unicode selection doesn’t work, we can use Regular Expressions to replace misread characters with correct letters, numbers or other characters.

In this example we want to replace the distorted german characters into its proper form using Tableau, Alteryx and python.

1. Tableau

In Tableau we can create a Calculated Field and use the REGEXP_Replace function. We have to select a field , a template and a replacement:

We can select multiple templates and replacements for a single field:

Here we see the original and the corrected version:

2. Alteryx

In Alteryx we can correct our characters directly in the fields: by using the Formula-Tool:

Result:

3. Python

If you are using python, you can replace the templates in the whole table without specifying columns:

Wed 29 Jun 2022

Fri 17 Jun 2022

Fri 17 Jun 2022