About EasyMorph Tutorials & Examples Web-help

Suffix with comma between last name and suffix causing rows to shift

I’m have a commas separated file where column 5 contains a name (first name middle name last name and suffix) and in some instances there is a comma after the last name and before the suffix which is causing the data to shift to the right.

Is there a way to filter on that column for a “comma” and then remove the comma and anything after that - see example below

Column 1, Column 2, Column 3, Column 4, Column 5 (issue column with , Sr), Column 6, Column 7, Column 8
220592,3422,22,Healthcare Center Franklin,William E Walker,Sr.,8730,1017.0,false

Hi Bill and welcome to the Community!

See below a sample project that removes extra comma from Column 5. Actions have annotations so you should be able to follow the calculation logic. Let me know if anything is not clear.

remove-extra-separator.morph (4.6 KB)
data.csv (238 Bytes)

To learn more about EasyMorph visit easymorph.com.