In this demonstration, we'll see how to use the match and choose conditional functions. So in the course journal, in section I'm going to click on Concrete Strength Data. And so the Concrete Strength data includes this column called Concrete Type, which indicates the brand of concrete mix and whether it was reinforced or not, if it was just standard during whatever this test was. And let's suppose I have another data set and I want to combine them together, and what I want to combine them on is based on the vendor. So I want to isolate that part of the Concrete Type character string in a new column called Vendor Code. So I'm going to use the match function to do that. So I'll get a new script editor window. This time, I'll just click on the Toolbar button. And I'll go ahead and use the for each row function. So I'll type for each row. Open parentheses. The column has already been created. So I don't need to use new column in this example. Colon, Vendor Code is going to be assigned the result of the match function. And for the match function, I'm going to use the word function, which we saw in an earlier demonstration, where the word function takes, as its arguments, first, which word from a string do I want? And I'm going to get the first word from that string. And second, where am I looking for that string or looking for the word in that string? And that's going to be in the column Concrete Type. The word function has an optional third argument where I can specify one or more delimiters as character strings. If I don't do that, it assumes the delimiter is a space. And that works for the Concrete Type column. So I'll close that parenthesis, type a comma. And if the value is Greystone, so that's a character string, I'll type a comma. The result will be for the Vendor Code. If the value is EZMix, also a character string, and that's capital EZM and then ix, close the character string, comma, the value will be and another comma. And if the value is Consolidated, so last character string, and, of course, I do have to spell it correctly, another comma, and that value will be And then I will type those closing parentheses, my semicolon. And I will reformat my script. Then I want to go ahead and run the script. And you can see back in the data table-- I'll navigate to that-- that the vendor codes have been successfully populated based on the first word from the character string stored in the Concrete Type data column. Let's take a look at the choose function using a different version of the concrete data table. So in the journal, I'm going to click on Concrete Mix Data. So here, there's an indication of whether an add mixture has been included in the manufacture of the concrete. So this is typically a liquid, and it's an additional ingredient in concrete. And one type of add mixture that might be added slows the setting rate of the concrete. That happens faster in hot weather. So we might want to slow it down because the slower hardening rate makes it easier to place and set the concrete. So I've got the Concrete Mix table open. And in this case, the Addmixture code of indicates that we slowed the rate of hardening by adding that liquid. And the code of indicates that we did not add that. The reason for this numbering is because zero is not a value that the choose function can understand. It has to be a positive nonzero integer. So in the course journal, I'll click Add Mixture Labels. So we're sending the new column message to the current data table. And the commonly called Addmixture. We're specifying that it's going to be character data. And then the for each row function, in this prewritten script, is assigning a value in Addmixture based on choose. Which we'll look in the column Addmixture Code. And if that returns a the value in the new column will be Slowed. And if it returns a it will be None. So I'm going to go ahead and run this. And you can see then in the table that we have the new column of Addmixtures where it's Slowed if the code is and None if the code was So here, you saw the more specialized conditional functions match and choose.