MCPcopy Create free account
hub / github.com/apache/arrow / test_replace_regex

Function test_replace_regex

python/pyarrow/tests/test_compute.py:1247–1255  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1245
1246
1247def test_replace_regex():
1248 data = pa.array(['foo', 'mood', None])
1249 expected = ['f00', 'm00d', None]
1250 ar = pc.replace_substring_regex(data, pattern='(.)oo', replacement=r'\100')
1251 assert ar.tolist() == expected
1252 ar = pc.replace_substring_regex(data, '(.)oo', replacement=r'\100')
1253 assert ar.tolist() == expected
1254 ar = pc.replace_substring_regex(data, '(.)oo', r'\100')
1255 assert ar.tolist() == expected
1256
1257
1258def test_extract_regex():

Callers

nothing calls this directly

Calls 1

arrayMethod · 0.45

Tested by

no test coverage detected