Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for
Search instead for
Did you mean:
Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
I am trying to find a way to search through a list of strings for all items that contain a partial string. I know this can be done using a For loop, but the list that I will be running this script on is very large and For loops take a very long time. I am wondering if there is some function out there similar to Loc(list, string) that will find the items that have the partial string.
One of the three strings contains the search pattern, the result list is 1/3 the size of the source. 1 second for 1.5 million items seems reasonable. What size list, typical item length, and what time requirement do you have?
Another approach, not as good. Avoids the explicit loop but copies the data into a table and uses row selection:
nitems(x); // 1572864
dt = New Table( "Untitled",
New Column( "Column 1", Character, "Nominal", Set Values( x ) )
show(stop-start); // 1.3 sec
show(stop-start); // 1 sec
JMP added better list support in JMP 13; if you are using an older version, read this post