Replace

The replace action simply finds values indicated and replaces them with a provided substitute. In Acho replace action is also performed at the column level. The replace function looks for patterns that match the one inputted, in any part of the cell value. This means that "ex" will find records such as "expenses" as well as "Apex" and "general experience", and replace just the "ex" portion with the provided substitute. Please also note that replace can work on any data type, but if the replacement value violates the data type, it will error out. For example, replacing "99" with "10" will work in an integer field, where 199 will become 110, and 99345 will become 10345. However, replacing "99" with "Ten" in the same field will error out because "Ten" does not qualify for integer and Acho refuses to perform the action because it conflicts with the data schema.

Replace can also be a powerful data cleaning technique when used properly. If it has been noticed that there are certain patterns in undesirable or unclean data, use the replace action to correct them. For example, for a string field containing gender information, perhaps some are recorded as "F" or "M", others are recorded as "Female" and "Male", and there are some even with "Woman" and "Man". In this situation, the user may decide to standardize, and replace all "Female" and "Women" with "F" and "Male" and "Man" with "M".

Last updated