Does Graphlab SFrame support regexp?

User 151 | 9/25/2014, 7:10:52 PM

E.g. results[results["user"]=="Eric Smith"], Could we do results[results["user"]=="Eric*"] ?


User 91 | 9/26/2014, 7:10:43 AM

The SFrame supports all things that python string comparison does. So, if you had a string in python

user = 'foo' user == 'foo*' will return False. Likewise, the == operator in the SFrame would return false.

You can use the SArray.apply (see the API docs) to do so. I would do

import re

sa = gl.SArray(["foo","bar", "foo1"]) func = re.compile('foo*') sa_new = sa.apply(lambda x: != None)

User 151 | 9/26/2014, 6:19:09 PM