Reputation: 11
I am pulling in a text file of data and using jmp script to clean it up. One column (Merch State) is populated with state initials (such as AL, CA, NJ, NY) and can have blanks. The blanks are due to international transactions and should be filled with International. I am having a tough time creating the correct script to replace any blanks within the column to International.
Any advice or assistance with this would be greatly appreciated.
Upvotes: 1
Views: 3775
Reputation: 4986
You don't indicate which version of JMP you're using so I'll guess JMP 13.
One option is to select the column and use Cols > Recode... and for the blank entry, just type in International and you can have it updated in-place or into a new column.
You can also select "Script" and it'll add a data table script variable which does the Recode. Here's what it made for me which you may be able to use directly.
Current Data Table() << Begin Data Update;
For Each Row(
:Merch State = Match( :Merch State, "", "International", :Merch State )
);
Current Data Table() << End Data Update;
Upvotes: 0