MCPcopy
hub / github.com/dask/dask / match

Method match

dask/bag/core.py:337–354  ·  view source on GitHub ↗

Filter strings by those that match a pattern. Examples -------- >>> import dask.bag as db >>> b = db.from_sequence(['Alice Smith', 'Bob Jones', 'Charlie Smith']) >>> list(b.str.match('*Smith')) ['Alice Smith', 'Charlie Smith'] See Also

(self, pattern)

Source from the content-addressed store, hash-verified

335 raise
336
337 def match(self, pattern):
338 """Filter strings by those that match a pattern.
339
340 Examples
341 --------
342
343 >>> import dask.bag as db
344 >>> b = db.from_sequence(['Alice Smith', 'Bob Jones', 'Charlie Smith'])
345 >>> list(b.str.match('*Smith'))
346 ['Alice Smith', 'Charlie Smith']
347
348 See Also
349 --------
350 fnmatch.fnmatch
351 """
352 from fnmatch import fnmatch
353
354 return self._bag.filter(partial(fnmatch, pat=pattern))
355
356
357def robust_wraps(wrapper):

Callers 15

ignore_warningFunction · 0.80
unsupported_argumentsFunction · 0.80
key_splitFunction · 0.80
shortenMethod · 0.80
test_string_namespaceFunction · 0.80
test_late_dtypesFunction · 0.80
get_labelFunction · 0.80
get_shapeFunction · 0.80
_parse_gufunc_signatureFunction · 0.80

Calls 1

filterMethod · 0.80